I am trying to match if string that can be multiple lines contains any tags surrounded with < > . My regex knowledge is quite limited, so far I got to
[\s,\S]*<\/?[A-Za-z][^>]*(?!>)[\s,\S]*
What I want it to do is detect opening < , that can be followed by 1 or more characters(letters) and this cannot be followed by closing > .
I want all the text to be evaluated as match thus [\s,\S] on both sides.
So basically it should match only if no tag is detected.
With above this works: hello<p>
(not match)
But this not: hello <pp>
(will match and should not)
Anyone who can help here?
EDIT: Let's forget about html, I would like to have regex that matches on string if it does not contain any text wrapped in <>. I can't understand how answer posted in comment answers that. I do not want to parse anything..
Example string: hello there
= match
Another: hello <there>
= NO MATCH.
Thanks