-3

I have url regexp which will find the urls. Here is my regexp

(?:(?:https?|ftp):\/\/|www\.)[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/gi

but, this regexp is not matching with following url

https://www.dpd.co.uk/apps/tracking/?parcel=15505969270050*18538&geoSession=37418a6f-ed43-405f-a596-782d7d78a9651

how I can match with these type of urls. Please help.

Mohammad
  • 20,339
  • 15
  • 51
  • 79

1 Answers1

0

Use: [-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.*~#?&//=]*)

Or with HTTPS prefix: https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~*#?&//=]*)

marcuse
  • 2,360
  • 18
  • 43