Finding & characters in HTML document

Q

How to find & characters that are not part of HTML entities in HTML code?

The the example HTML code is listed below:

✍: FYIcenter.com

A

The regular expression to find & characters that are not part of HTML entities in an HTML document can be written as: with multiple lines modifier "m" specified: Note that:

.*&             - Match the & character
(?![\w#\d]+;)   - Not followed by [\w#\d]+;

Click the button to test this regular expression here online:

2013-02-02, 2269👍, 0💬