Is it possible to dynamically evaluate the temp variable from the
regular expression and use it as a ColdFusion variable?
It's not a temp variable from the regular expression, it is a variable which
exists *within the scope* of that regular expression.
That's important to understand - given
Try this one out.
rereplace(dataContent, img.*?src=['||](.*?)['|| |].*?, \1, all)
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Jide Aliu [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 5:46 AM
To: CF-Talk
Subject:
Thanks Bobby for taking time out for the solution, that did the trick. It's the
start of my problem on the solution though how would you go about reReplacing
the same item with the tags below in a body of text/string. Is it at all
possible or should I be looking at something different from
-Original Message-
From: Jide Aliu [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 14, 2007 10:44 AM
To: CF-Talk
Subject: Re: reReplaceNoCase() problem from a newbie, please help
Thanks Bobby for taking time out for the solution, that did the trick. It's
the start of my problem on the solution though
:44 AM
To: CF-Talk
Subject: Re: reReplaceNoCase() problem from a newbie, please help
Thanks Bobby for taking time out for the solution, that did the trick. It's
the start of my problem on the solution though how would you go about
reReplacing the same item with the tags below in a body of text/string
:44 AM
To: CF-Talk
Subject: Re: reReplaceNoCase() problem from a newbie, please help
Thanks Bobby for taking time out for the solution, that did the trick. It's
the start of my problem on the solution though how would you go about
reReplacing the same item with the tags below in a body of text/string
Yep, that should work. Assuming #context# is a variable string
containing HTML and you're setting the return value int a variable:
cfset context = REReplaceNoCase(context,[^]*,,ALL) /
Is it stripping no HTML, some HTML? Is it erroring?
On 10/26/06, Les Irvin [EMAIL PROTECTED] wrote:
Dang,
I just tested it and it works for me.
-Original Message-
From: Rob Wilkerson [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 26, 2006 4:35 PM
Yep, that should work. Assuming #context# is a variable string
containing HTML and you're setting the return value int a variable:
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,
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,
Just be sure to htmleditformat() the string before you perform the
regex if you're planning to use this for say web-based syntax
highlighting. :)
Try REreplace(sql, ('[^']*'), strong$1/strong,
all)
That says find an apsotrophe, followed by any number of
non-apostrophe
characters, and then
Hey I tried \1 instead of $1 and it looks like its working! Going to
test more to make sure...
im sorry, htmleditformat()? why would I need that again?
On 9/21/05, S. Isaac Dealey [EMAIL PROTECTED] wrote:
Just be sure to htmleditformat() the string before you perform the
regex if you're
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,
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
Hey I tried \1 instead of $1 and it looks like its
working! Going to test more to make sure...
Oops! Sorry, I didn't notice that in Barney's post... $ is used by
Dreamweaver, JavaScript and I think ActionScript 2.0 (I believe it's
part of the ECMA standard) to indicate a back-reference...
( 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
im displaying a pre and this is only for sql code right now so that
shouldnt be a problem, but ill definately keep that in mind.
by the way, I did get the parenthesis to work:
cfset out = REreplace(out, (\([^']*\)), strong
class=paren\1/strong, all) /
On 9/21/05, S. Isaac Dealey [EMAIL
-Talk
Subject: Re: ReReplaceNoCase
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
Taking from Barney's example
REreplace(sql, (\([^\(|^\)]*\)), strong$1/strong,all)
On 9/21/05, Ryan Guill [EMAIL PROTECTED] wrote:
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,
Inside a class, you don't need to escape parens, use the or pipe, or
re-use the not ^. This is, I think, what you want:
REreplace(sql, (\([^()]*\)), strong\1/strong,all)
--Ben
Qasim Rasheed wrote:
Taking from Barney's example
REreplace(sql, (\([^\(|^\)]*\)), strong$1/strong,all)
On
im sorry, htmleditformat()? why would I need that
again?
To make sure that if the query has a or in it that
those
characters are converted to html entities before they're
displayed...
otherwise, a query like this:
select * from table where x #x# and y #y#
will display in the
Try this:
cfset string= font color=white
cfset newstring=rereplacenocase(string, ([^]*),\1,ALL)
__
steve oliver
cresco technologies, inc.
http://www.crescotech.com
-Original Message-
From: Eddie Shipman [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002
Even though I sent the message in plaintext...
the text that was sent in the message didn't come out correct...
This text,
#60; font color=#34;white#34;#62;
was supposed to be:
#38;#35;60;font color=#38;#35;34;white#38;#35;34;#38;#35;62;
I want it changed to:
font color=white
--- Steve
.
## for # and for
__
steve oliver
cresco technologies, inc.
http://www.crescotech.com
-Original Message-
From: Eddie Shipman [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 5:07 PM
To: CF-Talk
Subject: RE: ReReplaceNoCase problem
Even though I sent the message in plaintext
Instead of:
"%%(.+)%%"
try:
"%%([^%]+)%%"
"%%, followed by one or more characters that don't match %, followed by %%"
--
Paul Wakefield
All opinions expressed herein are those of the author and not of The Board
of Executors
-Original Message-
From: [EMAIL
Thank you very much for your help. That worked out really well...
Best regards,
Chris A.
-Original Message-
From: Paul Wakefield [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 24, 2000 12:34 AM
To: '[EMAIL PROTECTED]'
Subject: RE: ReReplaceNoCase is too greedy question
Instead
26 matches
Mail list logo