this expression:
REReplaceNoCase(REQUEST.theURL, '%%(\w+)%%',
#REQUEST.myQ[/\1][1]#, 'ALL')
The CF expression is evaluated *before* the regex does its stuff, and thus the
\1 never enters the regex 'scope', and doesn't gets treated as a regex
back-reference.
(hope that explanation makes sense
the color
column from the query. I'm trying to use REReplaceNoCase to find the key,
and replace it with the value. It almost works, but I can't seem to get it
the last 5%. Here's some sample code
!--- sample query ---
cfset REQUEST.myQ = QueryNew('vin,color')
cfset QueryAddRow(REQUEST.myQ, 1)
cfset
encountered and 245.jpg for the
second image tag. I have tried using the code below without any joy at all.
cfset content =
reReplaceNoCase(dataContent,'img.*?src=['|](.*?)['|].*?','\1','ALL')
~|
CF 8 â Scorpio beta now available
: reReplaceNoCase() problem from a newbie, please help
I have a body of text, in the body of text I want to replace all image tags
with the value of the src attribute, so for example below
This is the body it can be as long as 8,000 character but within the body here
is the image tag img alt= height=150
Regex?
ContentItem Href=BlissStarWars_15.jpg Duid=BlissStarWars_15.jpg
Commenthardcoded/Comment
MediaType FormalName=hardcoded/
Format FormalName=hard coded/
So instead of isolating the the image name like I did below
cfset content = REReplaceNoCase(dataContent,
img([^src]*)(src=['|])([/*[[:alnum
-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
Hello guys,
i have a problem with the following regex:
REReplaceNoCase(inputxml,text[^]*(.*)\/text,)
The regex should replace the tag text with all the content inside (even other
tags). It works fine if only one text.../text is in the whole string. But
if theres a second or a third
Hmm... CF regex is known for being greedy, and I believe you need to append
a ? to make it not greedy. So try something like this
REReplaceNoCase(inputxml,text[^]*?(.*?)\/text,)
Russ
-Original Message-
From: Markus Weber [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 05, 2006 9:21
Try doing a NON-greedy search by putting a ? After your selector:
REReplaceNoCase(
inputxml,
text[^]*(.*?)\/text,
,
ONE
)
Notice, (.*?) this should match the shortest possible string.
..
Ben Nadel
Certified Advanced ColdFusion MX7
Dang, I'm confused. Will this function strip all the html code from a
document, including that in between the brackets?
REReplaceNoCase(context,[^]*,,ALL)
It doesn't seem to be working. Or I've screwed up the code. Is there a
better way?
Thanks in advance,
Les
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
:
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'm confused. Will this function strip all the html
code from a
document, including that in between the brackets
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
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
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
'/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?
s. isaac dealey
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?
s. isaac dealey 954.522.6080
new epoch : isn't it time
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
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
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...
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
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
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
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
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
I have this text:
font color=white
How would I turn it into:
font color=white
using REReplaceNoCase...
This effort chokes:
temp = font color=white
REReplaceNoCase(temp, ##60;(font[^62](##62;), \1, ALL);
__
Do You Yahoo!?
Great stuff
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 4
Oliver [EMAIL PROTECTED] wrote:
Try this:
cfset string= font color=white
cfset newstring=rereplacenocase(string, ([^]*),\1,ALL)
SNIP
How would I turn it into:
font color=white
using REReplaceNoCase...
This effort chokes:
temp = font color=white
REReplaceNoCase(temp, ##60
.
## 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
nal Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 21, 2000 10:08 PM
To: [EMAIL PROTECTED]
Subject: ReReplaceNoCase is too greedy question
Hi,
I am trying to do a regular express that will replace all
defined areas of a
text file with a blank. ie..
C
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
%%
My regular express looks like this
cfset content = ReReplaceNoCase(content,"%%(.+)%%","",'All')
This call replaces everything between the first "%%" and the last "%%" 3
lines down in the text with the blank. I want it to not be greedy and
replace "%%T
35 matches
Mail list logo