Hello, I&#039;ve been trying to work on a regexp pattern to match specified words within the visible text of an HTML page.<BR><BR>Source Text: "This is a valid match but &lt;IMG height=100 alt="This would not be a valid match due to being inside an HTML tag" src="http://blabla/bla.jpg" width=512 align=right border=0&gt;"<BR><BR>The word valid would be matched in the first instance but not the second.<BR><BR>The effective pattern I&#039;ve got so far is:<BR><BR>(&#062;{1}[^&#060;]{1}.*)(valid)([)?.,]?[.&#124 ])(.*[^&#062;]{1}&#060;{1})<BR><BR>but it just doesn&#039;t work how I expected, matching the 2nd rather than the first