Right, spent a while trying to work out how I can modify it, but whatever I try it 
doesn't affect what I intend it to affect!  For instance: I don't want to replace & 
signs with "and," because that'll make   turn into "andnbsp;" - in fact it turns 
it into ",amp;nbsp"

All I need it to do is remove common HTML tags, like <br>, <b>, <i> and replace them 
with " ".  Similarly, "&nbsp;" should just be replaced with a " "

In fact, I think I can limit the "tags to be removed" to just <b></b> <br> &nbsp; and 
;quot

Is this one for the regex list?

Rgds

Will

PS thanks for all your help so far.


>StructInsert(RSS_Struct, "description",
>REReplace(REReplace(Replace(ReplaceNoCase(ReplaceNoCase(ReplaceNoCase(GetTok
>en(rssDoc,  NextToken+1, "<>"),"�","
>","all"),"<li>","-","all"),"&","and","all"),"#chr(13)##chr(10)#","#chr(13)##
>chr(10)##chr(13)##chr(10)#","all"),"<[^>]+>","","all"),"[[:space:]]*#chr(13)
>##chr(10)#[[:space:]]*#chr(13)##chr(10)#","#chr(13)##chr(10)##chr(13)##chr(1
>0)#","all"));
>
>This is a whole bunch of replaces and REReplaces
>The first one changes � to a ' '.   The second one changes <li> to '-',
>the third one changes any additional '&' to 'and', the fourth one changes a
>single windows break return to a double break return.  The next one gets rid
>of all HTML tags and their content, and the last one is more for multipart
>mail then for HTML.  It changes spacereturns from an improperly formatted
>e-mail (need two 'carrage returns' to complete an email DATA transaction),
>to a double return instead of a space return, space return.
>
>-Zine
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Monday, May 12, 2003 9:37 AM
>To: CF-Talk
>Subject: Regex inside a loop [[corrected]]
>
>
>Thanks Zine!  Getting there.  It's monged the text slightly - there are a
>load of "gt;" and "lt;" - eg:
>
>"finished in near darkness at 8.40pm, remarkably ended dead level.
>andlt;bandgt;...andlt;/bandgt;"
>
>I'm afraid I don't understand your regex, it's far too snazzy - so if you
>can offer any advice, that'd be great
>
>Thanks
>
>Will
>
>
>>Whoops, I was missing a comma,
>>[[corrected]]
>
>>PS:
>>
>>Here is the full function with the NOHTML hack;
>
><snipped>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to