That doesn't make any sense. I'm scratching my head on this one. I just ran a quick test (empasis on quick) and it seemed to work fine.
Is it really returning a colon after "Bob"? Could it be a glitch in the output, or are you outputting #fieldval# directly? Just some thoughts.... --Ben Burns, John D wrote: > Ben, > > Great catch. That was my stupidity. However, the regex is picking up a > little bit too much info. For instance, if this was the text: > > firstName: Bob lastName: Jones > > When I run the regex, it's returned "Bob: lastName:" as the value of > firstName. It's like it's going to the next space after the one right > after the value. Is there a tweak that needs to be made? > > <cfset fieldName="firstName"> > <cfset fieldVal=rereplace(content,".*#fieldName#: +([^ ]+) +.*","\1")> > > > Thanks for the help! > > John Burns > > -----Original Message----- > From: Ben Doom [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 21, 2004 1:28 PM > To: CF-Talk > Subject: Re: RegEx help > > Are you sure you've got the fieldname correct? Capitilization counts. > If you want to do a case-insensitive search, use rereplacenocase() > instead. > > --Ben ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182244 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54