( and ) need to be escaped...
<cfset out = REReplace(out,"(\([^)]*\))","<strong>\1</strong>")>
> yeah, the \1 works.
> Now, how can I do the same thing, only this time looking
> for ( and )
> surrounding the text? My first attempts havent worked...
> On 9/21/05, Rick Root <[EMAIL PROTECTED]> wrote:
>> I think he meant \1 not $1
>>
>> Rick
>>
>> Ryan Guill wrote:
>> > no, that puts just $1 in there, it doesnt fill it in...
>> >
>> > am I doing something wrong?
>> >
>> > <cfset out = REreplace(out, "('[^']*')", "<strong
>> > class=""paren"">$1</strong>", "all") />
>> >
>> > On 9/21/05, Barney Boisvert <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> >>Try REreplace(sql, "('[^']*')", "<strong>$1</strong>",
>> >>"all")
>> >>
>> >>That says find an apsotrophe, followed by any number of
>> >>non-apostrophe
>> >>characters, and then another apostrophe and replace it
>> >>with itself,
>> >>surrounded by STRONG tags.
>> >>
>> >>cheers,
>> >>barneyb
>> >>
>> >>On 9/21/05, Ryan Guill <[EMAIL PROTECTED]> wrote:
>> >>
>> >>>hey guys,
>> >>>
>> >>>not ever really used regex much except for really
>> >>>simple cases. But
>> >>>have a question about it now.
>> >>>
>> >>>Lets say I have the following sql code:
>> >>>
>> >>>SELECT * FROM sometable WHERE this = 'this string'
>> >>>
>> >>>and I want to replace the single quotes AND its
>> >>>contents with the same
>> >>>things only surrounded by <strong> tags. so take the
>> >>>string above,
>> >>>look for single quotes and make it like this:
>> >>>
>> >>>SELECT * FROM sometable WHERE this = <strong>'this
>> >>>string'</strong>
>> >>>
>> >>>(thats not exactly what I want to do, but close
>> >>>enough.)
>> >>>
>> >>>how would you go about doing this with
>> >>>rereplacenocase? is it even
>> >>>possible? all examples I see are looking for a regex
>> >>>that can have
>> >>>wildcards in the middle etc, but how to take what you
>> >>>find and wrap
>> >>>it?
>> >>>
>> >>>thanks,
>> >>>--
>> >>>Ryan Guill
>> >>>BlueEyesDevelopment
>> >>>[EMAIL PROTECTED]
>> >>>www.ryanguill.com
>> >>>(270) 217.2399
>> >>
>> >>--
>> >>Barney Boisvert
>> >>[EMAIL PROTECTED]
>> >>360.319.6145
>> >>http://www.barneyb.com/
>> >>
>> >>Got Gmail? I have 100 invites.
>> >>
>> >>
>> >
>> >
>> >
>>
>>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:218854
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