Thanks, I will file that away for future use. We need a repository of
commonly used regular expressions for people like me who are not very
good at them!

Problem I'm having is, I want to replace the horrible bloated paragraphs
with simple "<p>" and "</p>" later, after I have done some other
transformations on the text (greeking out characters). I have worked
around the problem (replacing each pipe character with a single "<p>"
later gives an equivalent output in the browser, so that's enough for
me) but I was wondering why it was skipping the first ">" and jumping
straight to the second occurance. Just seems odd.

Ta,
K.

"Don Vawter" <[EMAIL PROTECTED]> wrote:
> <cfset cleanme = rereplace(mystring,"<[^>]*>","","all")>
> this will strip all tags
> 
> ----- Original Message -----
> From: "Kay Smoljak" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Wednesday, December 12, 2001 7:35 AM
> Subject: RE help needed: stripping tags from a string
> 
> 
> > Hi all,
> >
> > I'm trying to get a regular expression working to replace some 
> > particularly horrible markup (yes it's Microsoft-generated) with 
> > something manageable. I'm trying to turn this string:
> >
> > <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"> </P>
> > <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt">Blah Blah Blah</P>
> >
> > Into this:
> >
> >  | | | Blah Blah Blah |
> >
> > So far I have this:
> >
> > <cfset cleanme = REREplaceNoCase(mystring,"[<][[:print:]]*[>]"," | 
> > ","ALL")>
> >
> > to try and turn all paragraph tags into pipe characters flanked by 
> > spaces. But, instead of it matching any printable character from the

> > first < to the first >, which is what I thought it should do, it's 
> > ignoring the first > and the second < and skipping to the second >. 
> > So the first two paragraph tags, instead of being converted to two 
> > pipes, are being converted to one. Argh!
> >
> > If anyone can point out where I'm going wrong, I'd really appreciate

> > it.
> >
> > K.
> > 
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to