Regular Expressions 101

Community Patterns

1...56789...901

Community Library Entry

5

Regular Expression
PCRE (PHP <7.3)

/
<a.+?\s*href\s*=\s*["\']?([^"\'\s>]+)["\']?
/
gi

Description

Find all href in a tag

Submitted by Miron Yanovskiy - 11 years ago