Regular Expressions 101

url extractor

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
((?:(?:https?):\/\/)?(?:\S+(?::\S*)?@)?(?:(?:[a-z0-9][a-z0-9\-]*?[a-z0-9]+)(?:\.(?:[a-z0-9\-])*[a-z0-9]+)*(?:\.(?:[a-z]{2,})(:\d{1,5})?))(?:\/[^\s]*)?)(?:[ ]+[^< ]|\Z|\n)
/
ig

Description

Will extract URLs from text string if they have a space or line ending at the end and are not wrapped inside a string delimiter

Submitted by pip