Regular Expressions 101

Community Patterns

1

extract url from html markdown

PCRE2 (PHP >=7.3)
222
Submitted by seocringe - 2 years ago
1...34567...141

Url

2

Regular Expression
PCRE2 (PHP >=7.3)

/
((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)(:[0-9]{0,5})?(#[\w]*)?((?:\/[\+~%\/.\w\-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[.\!\/\\w]*))?)
/
ig

Description

Loading markdown...
Submitted by semivori - 3 years ago