Badtags = "B|P|HR|PRE";
Expression = "<[[:space:]]?/?[[:space:]]?(#Badtags#)[^>]*>";
Message = REReplaceNoCase(Message, Expression, '', 'ALL');
> i'm completely new to regular expressions, but my understanding is that
> they can be used to perform multiple find/replace all in one exception.
> i have a string that i must filter for several HTML tags before
> continuing. the code follows. how would i write a regular expression to
> perform all?
>
> <cfscript>
> newStr = ReplaceNoCase(newStr,"<b>","","ALL");
> newStr = ReplaceNoCase(newStr,"</b>",".","ALL");
> newStr = ReplaceNoCase(newStr,"<p>","","ALL");
> newStr = ReplaceNoCase(newStr,"</p>","","ALL");
> newStr = ReplaceNoCase(newStr,"<hr>"," ","ALL");
> newStr = ReplaceNoCase(newStr,"<pre>","","ALL");
> newStr = ReplaceNoCase(newStr,"</pre>","","ALL");
> newStr = ReplaceNoCase(newStr,"<hr>"," ","ALL");
> </cfscript>
>
> -mike
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists