Don't capture markup

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
bokehman
Forum Regular
Posts: 509
Joined: Wed May 11, 2005 2:33 am
Location: Alicante (Spain)

Don't capture markup

Post by bokehman »

Code: Select all

<p> [color=red]dog < cat " horse [/color]</p>
I am trying to capture only parts of an html string that are not makup. The string may contain "<" or ">" not in markup context. The purpose of this is to apply entities only to the non markup part of the string. Any ideas?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Filter out the markup with say a split function that knows what tags are valid markup and what aren't.
Post Reply