Yeah, that's why free advice from me is worth every penny you paid for it.

Here's what I sent him offlist.

<cfset newContent=rereplace(Content,"\[([[:digit:]]+)\]","<a 
href=""here.cfm?v=\1"">view</a>","ALL")>

[[:digit:]] rather than \d
string comes before regex in param list

That's what comes from trying to answer too fast, and switching between CF and perl 
all day.

Abashed and ashamed,
Jerry Johnson

>>> [EMAIL PROTECTED] 05/06/02 04:18PM >>>
Hmm. Careful, I think that will only match a single digit number.  Hers the
fix.  DRE

<cfset newContent=rereplacenocase(Content,"\[([1-9]+)\]","<a
href=""here.cfm?v=\1"">view</a>","ALL")>


-----Original Message-----
From: Deanna Schneider [mailto:[EMAIL PROTECTED]] 
Sent: Monday, May 06, 2002 2:18 PM
To: CF-Talk
Subject: Re: Looping to find [brackets]


Oops. Shoulda played a little longer. Here's the real code that works.
(never knew about that v=\1 thing...what are the "rules" for that?)

<cfset newContent=rereplacenocase(Content,"\[([1-9])\]","<a
href=""here.cfm?v=\1"">view</a>","ALL")>




Deanna Schneider
Interactive Media Developer
[EMAIL PROTECTED] 




______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
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