I’m trying to search through many documents and find all instances where an html code is specified, except when > and < are used.
The folloiwng search
&[a-z]*\;
matches all HTML codes, eg > etc.
I would like to modify this search so I can say, give me all HTML codes EXCEPT > and <. I need to be able to do this in one expression.
Using http://regexpal.com/ and the following as the sample text:
><™
Only the first and last codes should be highlighted
Try this:
&[A-Za-z]+(?<!>|<);