Reputation: 325
I am using the below regex to find anchor tag which have not closing tag but it is not working. Only match which does not have closing tag. can any provide the correct regex which would really works in this condition.
Regex :
<a[^><]+\b(?!>)
(It also selects the anchor tag which have closing tag)
https://regex101.com/r/LbmI2G/1
Upvotes: 0
Views: 1063
Reputation: 110572
A bit more simplistic than Tim's but here's a basic idea:
<
before a >
, or:>
Upvotes: 2