Regular Expressions 101

Community Patterns

Find HTML anchor tag <a> without href attribute

0

Regular Expression
PCRE (PHP <7.3)

/
<a(?=\s|>)(?!(?:[^>=]|=(['"])(?:(?!\1).)*\1)*?\shref=['"])[^>]*>.*?<\/a>
/
g

Description

no description available

Submitted by anonymous - 7 years ago