Regex to detect href not correctly closed
-
Sorry, do you suggest me a regex to find in a page not properly closed href tags, like this?
-
Sorry, do you suggest me a regex to find in a page not properly closed href tags, like this?
Regex is not really the right tool to be parsing HTML. However, it's fairly simple to detect unbalanced angle brackets:
<[^>]*(<|$)
Regexper[^] Debuggex: Online visual regex tester. JavaScript, Python, and PCRE.[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
Regex is not really the right tool to be parsing HTML. However, it's fairly simple to detect unbalanced angle brackets:
<[^>]*(<|$)
Regexper[^] Debuggex: Online visual regex tester. JavaScript, Python, and PCRE.[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Ok Richard, thaks a lot ;)