i have some html files which i need to be able to read and find
all referenced files in it. Like all jpg, gif, css, js files etc that
are being used inside the html tags.
This is a job for CF_REExtract!
See: http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm
--
On Dec 28, 2007 2:11 PM, Claude Schneegans [EMAIL PROTECTED] wrote:
i have some html files which i need to be able to read and find
all referenced files in it. Like all jpg, gif, css, js files etc that
are being used inside the html tags.
This is a job for CF_REExtract!
See:
yeah, didn't see that coming
LOL... always ready to help people
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
thanks guys any other ideas, code samples etc?
On Dec 28, 2007 6:13 PM, Claude Schneegans [EMAIL PROTECTED] wrote:
yeah, didn't see that coming
LOL... always ready to help people
--
___
REUSE CODE! Use custom tags;
See
any other ideas
Don't ask me ;-)
--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
I know some regex people are going to jump all over this but I really don't
know regex.. Try this on 8 with a html page in the same directory, It will
give you an array of structures with information about the images in a html
document.
html
head
titleRegEx PlayGround/title
/head
body
Thanks Dan... i tried your code... all i getting in the cfdump is an
empty array.
Any ideas?
On Dec 28, 2007 11:32 PM, Dan Vega [EMAIL PROTECTED] wrote:
I know some regex people are going to jump all over this but I really don't
know regex.. Try this on 8 with a html page in the same
Dan, I just did a cfdump for variable images in your code. Even that
shows up an empty array... are you sure the regular expression is
correct in this line? cfset images = REMatchNoCase(img[^]*/,
htmldoc)
On Dec 28, 2007 11:32 PM, Dan Vega [EMAIL PROTECTED] wrote:
I know some regex people are
Yes. I am reading a html file. I changed the first regular expression
like this:
cffile action=read file=#expandPath('homepage.html')#
variable=htmldoc
!--- return an array of image tags ---
cfset images = REMatchNoCase(img([^]*[^/]), htmldoc)
This gives me a cfdump of all img tags.
yes. i am sure about that. I have CF8. I think i found out what the
problem is. Some of the img tags have no double quotes in them... like
this.. img src=/img/jjj.gif instead of img src=/img/jjj.gif
On Dec 29, 2007 1:08 AM, Dan Vega [EMAIL PROTECTED] wrote:
are you sure your on CF8?
Dan... i also need to do the same thing in CF 7... do you know a quick
way to do that too?
On Dec 29, 2007 1:11 AM, Web Exp [EMAIL PROTECTED] wrote:
yes. i am sure about that. I have CF8. I think i found out what the
problem is. Some of the img tags have no double quotes in them... like
this..
Doug Hyde wrote:
So, I tried creating a regular expression to remove it and came up with the
following:
cfset location = ReplaceNoCase(location,[:punct:]?lang=[0-9], , ALL)
You need REReplace(), not Replace().
Jochem
~|
Thank you guys for pointing me to the right direction. The udf StripTags is
really god sent.
Thanks
cfcoder
CFLib.org is your friend :) Check out the function called StripTags.
It does exactly what you want.
http://www.cflib.org/udf.cfm?ID=774
Cedric
You may have to use a negative lookahead. Try something like this:
(?!\/?(br|b|span|i|strong|div|p))[^]*
This hasn't been tested and is purely from memory, but I think that
(or something close to it) should remove any tag that is *NOT* the
open or closing tag of one you listed.
For more
Not sure if this has been suggested (coming in late), but this
function works well.
http://www.cflib.org/udf.cfm?ID=774 (Thanks Isaac)
Not a simple regex, but it gets the job done.
On 4/13/06, cf coder [EMAIL PROTECTED] wrote:
Hello Everybody,
I need your help with regular expressions.
Yeah I hawked it. :P
Thanks Jerry.
I love that people like this function so much, it makes me smile
whenever I see it recommended, because I know I've helped them. :)
I wrote an article for CFDJ that should be in the next issue(?) about
an alternative approach of using XML and a CFC to handle
CFLib.org is your friend :) Check out the function called StripTags. It does
exactly what you want.
http://www.cflib.org/udf.cfm?ID=774
Cedric
~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237707
Archives:
HI cfCoder
You could try something along these lines:
reReplaceNoCase(str,(font)[^]*,,all)
replaceNoCase(returnStr,/font,,all)
You could then be selective to the tags you wish to strip out.
Hope this helps.
All the best
Jose Diaz
On 4/13/06, cf coder [EMAIL PROTECTED] wrote:
Hello
rereplacenocase(string, 'body[^]*(.+)/body', \1)
Your looking for the body tag with anything in it, then everything after
that body tag that does not include the ending body tag. Using REReplace is
the most efficient here as your peeling off what you don't want (i.e. whats
not body content)
_
You, sir, are a saint.Thank you.
Here's the code I ended up using:
REReplaceNoCase(contents, '.+body[^]*(.+)/body.+', \1)
As it was, it removed the BODY tags but not the contents before and after
them.
Again, thanks.
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
The additions are correct. I was a bit hasty in my posting.
_
From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 14, 2004 11:20 AM
To: CF-Talk
Subject: RE: Regular Expressions: Extract code between BODY tags
You, sir, are a saint.Thank you.
Here's the code I ended
Actually this should be
rereplacenocase(string, '.*body[^]*(.+)/body.*', \1)
Pascal
-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
Sent: 14 September 2004 16:54
To: CF-Talk
Subject: [Spam?] RE: Regular Expressions: Extract code between BODY
tags
Cool.Again, thanks.
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/
Michael Dinowitz wrote:
The additions are correct. I was a bit hasty in my posting.
[Todays Threads]
[This Message]
[Subscription]
[Fast
or
overhead differences. I doubt it, but :)
_
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 14, 2004 11:25 AM
To: CF-Talk
Subject: RE: Regular Expressions: Extract code between BODY tags
Actually this should be
rereplacenocase(string, '.*body[^]*(.+)/body.*', \1
there is any difference.
Pascal
-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]
Sent: 14 September 2004 17:34
To: CF-Talk
Subject: [Spam?] RE: Regular Expressions: Extract code between BODY
tags
Either the .* or the .+ will work as the original poster said that the
body
I am not 100% percent sure, but my mind tells me you can't run a CF function on the backreference value in a regular _expression_.
Jerry Johnson
[EMAIL PROTECTED] 07/07/04 02:48PM
Can someone tell me why the following code will not work:
cfset myvar = REReplace(myvar, %([[:xdigit:]]{2}),
Rereplace takes 4 strings, it doesn't take any expressions.To put it
another way, any expressions you place inside the function call are
evaluated into strings, and then the strings are passed to the Rereplace
call.The only processing you can use inside the replace string is that
which the RE
Thanks for the help. For anyone who is interested, here is the code I came up with to escape the hex sequences. urlDecode wasn't working right so I used a workaround (inputBaseN).
cfloop condition=reFind('%([[:xdigit:]]{2})',filecontent)
cfset st = reFind(%([[:xdigit:]]{2}),filecontent,1,true)
You can't do it with only regexp. There is a function in the
cfide/scripts/cfform.js file tht does about that. You can validate most
of it with
/^(0?[1-9]|[12]\d|3[01])\/(0?[1-9]|1[0-2])\/(\d{2}){1,2}$/
Then extract the day, month and year and see if the day is correct.
-Original
function daysInMonth(y,m){
if (m == 4 || m == 6 || m == 9 || m == 11)
return 30;
else if (m == 2)
{
if (y % 4 0)
return 28;
else if (y % 100 == 0 y % 400 0)
return 28;
else
return 29;
}
else return 31;
}
function isDate(date){
var date_pattern =
Thanks! also thanks to Ben. This is what I needed.
-Mark
-Original Message-
From: Pascal Peters [mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 12:38 PM
To: CF-Talk
Subject: RE: Regular expressions in JS (or in general) for dates
function daysInMonth(y,m){
if (m == 4 || m == 6
I sent it too soon.
I used option value=[0-9]*
Great! :O)
Thanks anyway
Jordan
-Original Message-
From: Jordan Thomas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 9 September 2003 3:50 PM
To: CF-Talk
Subject: Regular Expressions in CF Studio
Hi,
I want to remove all of the option tags
I'm so sorry about the title - it was originally addressed to a friend but
then decided to send it to cf-talk halfway through the email.
-Original Message-
From: Cantrell, Adam [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 4:38 PM
To: CF-Talk
Subject: please do my
Ooops I'm sorry, I'm actually trying to extract this value from the
cgi.HTTP_REFERER variable. Here's what I'm currently using:
cfif (isDefined(cgi.HTTP_REFERER)) AND (FindNoCase(pCode=,
CGI.HTTP_REFERER))
cfset variables.pCode = mid(cgi.HTTP_REFERER,FindNoCase(pCode=,
that's messy i think. i would loop through the cgi.http_referer.
cfset pCodeValue=No pCode value Found
cfloop list=#cgi.http_referer# index=i delimiters=
cfif Find(pCode,i) and ListLen(i,=) eq 2
cfset pCodeValue=ListGetAt(i,2,=)
/cfif
/cfloop
cfoutput#pCodeValue#/cfoutput
With this,
Cantrell, Adam wrote:
Ooops I'm sorry, I'm actually trying to extract this value from the
cgi.HTTP_REFERER variable. Here's what I'm currently using:
cfif (isDefined(cgi.HTTP_REFERER)) AND (FindNoCase(pCode=,
CGI.HTTP_REFERER))
cfset variables.pCode =
, 2002 3:19 PM
To: CF-Talk
Subject: RE: regular expressions (was: please do my work for me)
that's messy i think. i would loop through the cgi.http_referer.
cfset pCodeValue=No pCode value Found
cfloop list=#cgi.http_referer# index=i delimiters=
cfif Find(pCode,i) and ListLen(i,=) eq 2
cfset
: REreplace(str, [.]*pCode=([^]*)[.]*, \1);
This won't work. The brackets around the dot make it a literal character,
so it won't match what's leading or following the pcode bit. Essentially,
all this will do is strip pcode= out of the url.
--Ben Doom
Programmer General Lackey
Posted this yesterday, but it never made it on the list.
I'm a little rusty on my regular expressions. Can somebody help me out
with these two that I'm having problems with.
The first is
cfset st1 = REFindNoCase('Our New Price: font
color=.?AA\$([0-9\.]+)BR/font',testString,1,TRUE)
0 or 1 times. I don't
understand how that is legal regex. Is CF regex that much different
then perl?
Russ
-Original Message-
From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 10:34 AM
To: CF-Talk
Subject: Re: Regular Expressions
Posted this yesterday
: What does [^]*? Mean exactly? I seem to be using something similar in
: my old code but can't remember what it means.
:
: I know perl regular expressions and this doesn't seem to make sense.
: [^] means expression starting with a then * is a modifier meaning
: zero or more and ? is a
What does [^]*? Mean exactly? I seem to be using
something similar in my old code but can't remember
what it means.
[^] means match any character other than
* means match 0 or more of the previous expression, so in this case 0 or
more of any character other than
the ? after the * is
What does [^]*? Mean exactly? I seem to be using
something similar in my old code but can't remember
what it means.
[^] means match any character other than
* means match 0 or more of the previous expression, so in this case 0 or
more of any character other than
the ? after
Disclaimer: I learned on Perl, so every once in a while, my syntax gets
garbled between Perl and CF. Either forgive me or ignore me.
There are one or two things you can do to optimize regexps in general.
First, maximize the length of any mandatory fixed string. That is, if you
know a
Ben is forgetting that CF 5 and earlier RegEx are greedy and his example will get a
lot more than just from Ben to the period. It'll get from Ben to the last period
on the page or string. This would work better in CF5 and earlier
Ben is [^.]*\.
Note that there's really just one type of
: Regular Expressions/Speed
Disclaimer: I learned on Perl, so every once in a while, my syntax gets
garbled between Perl and CF. Either forgive me or ignore me.
There are one or two things you can do to optimize regexps in general.
First, maximize the length of any mandatory fixed string
: Ben is forgetting that CF 5 and earlier RegEx are greedy and his
: example will get a lot more than just from Ben to the period.
: It'll get from Ben to the last period on the page or string.
: This would work better in CF5 and earlier
: Ben is [^.]*\.
: Note that there's really just one type
Have you played with the MX RegEx any?
: Ben is forgetting that CF 5 and earlier RegEx are greedy and his
: example will get a lot more than just from Ben to the period.
: It'll get from Ben to the last period on the page or string.
: This would work better in CF5 and earlier
: Ben is
Ben is forgetting that CF 5 and earlier RegEx are greedy and his example
will get a lot more than just from Ben to the period. It'll get from
Ben to the last period on the page or string. This would work better in
CF5 and earlier
Ben is [^.]*\.
Note that there's really just one type of
I'm not sure what you mean by your question. Rewrite their existing expressions from
what? Perl? Maybe. The new syntax is very Perl-like.
--
The ? is a new 'command' in MX RegEx that tells the previous special character to only
operate as many times as needed but not more. For example,
Ben is [a-zA-Z ]*?\.
: would work in MX. Note the ? after the asterisk. it says get all of a-z
: but only as many as needed to fulfill the requirements. Be
: stingy. But its
: still doing more comparisons. If the character an a? a b? a c? etc.
:
: Is the ? in that string part of an attempt on
: Have you played with the MX RegEx any?
Nope. We're running CF 5 here. After working in Perl for years, I'll
freely admit (gripe? yell? complain bitterly?) that the CF 5 regexps don't
quite stack up. Is the CFMX RexEx parser any better?
Not that that'd convince my boss to upgrade. If it
CF RegEx has been greedy from day 1. The new ? addition gives the option for stingy
matches.
: Is the ? in that string part of an attempt on MM's part to not make people
: have to rewrite their existing expressions, or is that just the way it
: works?
Hmm. That's the way it works in
Nope. We're running CF 5 here. After working in Perl for years, I'll
freely admit (gripe? yell? complain bitterly?) that the CF
5 regexps don't
quite stack up. Is the CFMX RexEx parser any better?
Much. It's very close to be being 100% compat with Perl.
Nope. We're running CF 5 here. After working in Perl for
years, I'll freely admit (gripe? yell? complain bitterly?)
that the CF 5 regexps don't quite stack up. Is the CFMX RexEx
parser any better?
Not that that'd convince my boss to upgrade. If it ain't
broke, don't fix it, I
I'm not sure what you mean by your question. Rewrite their
existing expressions from what? Perl? Maybe. The new
syntax is very Perl-like.
I meant from CF 5 and earlier ... the greedy regex ...
--
The ? is a new 'command' in MX RegEx that tells the
previous special character to only
I'm not sure what you mean by your question. Rewrite their
existing expressions from what? Perl? Maybe. The new
syntax is very Perl-like.
I meant from CF 5 and earlier ... the greedy regex ...
Greedy is the base for all RegEx.
--
The ? is a new 'command' in MX RegEx that tells
I'm not sure what you mean by your question. Rewrite
their
existing expressions from what? Perl? Maybe. The new
syntax is very Perl-like.
I meant from CF 5 and earlier ... the greedy regex ...
Greedy is the base for all RegEx.
Oh okay, thanks for the clarification.
--
The ?
What regex library are you using? That's the defining factor --the parser.
Just like xml parsers are different so are regex libs/utilities.
On Tue, 9 Jul 2002, Cornillon, Matthieu wrote:
Does anyone have anything concrete to say about the speed of searching using
regular expressions? Are
Oops. Gulp. (And other sounds of cringing terror.) Er...what's a regex
library?
Matthieu
-Original Message-
From: Alex [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 9:55 PM
To: CF-Talk
Subject: Re: Regular Expressions/Speed
What regex library are you using? That's
Oops. Gulp. (And other sounds of cringing terror.)
Er...what's a regex library?
You're using the default regex library that's native to whatever version of
CF you're using... I've heard that the regex libraries in cfmx are better --
not having the 2000 character limitation and possibly
http://www.houseoffusion.com/RegEx.ppt
-Original Message-
From: Dowdell, Jason G [mailto:[EMAIL PROTECTED]]
Sent: maandag 11 maart 2002 13:48
To: CF-Talk
Subject: Regular expressions
Hi all,
I'm looking for a good tutorial/reference manual for regualar
expressions. Being that I came
http://www.amazon.com/exec/obidos/ASIN/1565922573/qid=1015855436/sr=8-1/
ref=sr_8_67_1/102-6894441-0446552
-Original Message-
From: Dowdell, Jason G [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 4:48 AM
To: CF-Talk
Subject: Regular expressions
Hi all,
I'm looking for a
http://www.houseoffusion.com/RegEx.ppt
Here's a quote from a great movie most of you should recognize...
Sounds like somebody has a case of the Mondays!
Hrmmm.. let's see.. must have been from Dude Where's My Car.
__
Why
Here's a quote from a great movie most of you should recognize...
Sounds like somebody has a case of the Mondays!
Hrmmm.. let's see.. must have been from Dude Where's My Car.
No way. That's clearly an Office Space reference. In the future, let's try
not to confuse any line from Dude
and I'll also go get the reference manual from
O'Reilly press as well.
Thanks again,
Jason
-Original Message-
From: Dave Carabetta [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 10:55 AM
To: CF-Talk
Subject: RE: Regular expressions
Here's a quote from a great movie most of you
line)
www.figleaf.com
-Original Message-
From: Dowdell, Jason G [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 11:01 AM
To: CF-Talk
Subject: RE: Regular expressions
The answer I was looking for was Office Space.
Fortunately, I've never seen Dude Where's My Car? but
I can see
Here's a quote from a great movie most of you should recognize...
Sounds like somebody has a case of the Mondays!
Hrmmm.. let's see.. must have been from Dude Where's My Car.
No way. That's clearly an Office Space reference. In the future, let's try
not to confuse any line from Dude
On Mon, 11 Mar 2002, Dave Carabetta wrote:
Here's a quote from a great movie most of you should recognize...
Sounds like somebody has a case of the Mondays!
Hrmmm.. let's see.. must have been from Dude Where's My Car.
No way. That's clearly an Office Space reference. In the future,
A few more :-)
http://py-howto.sourceforge.net/regex/regex.html
http://gosling.miass.chel.su/books/Perl/3/RegExp_Tutorial.html
http://www.cfugorama.com/cfugorama/codelibrary/Regular-Expressions.cfm
http://www.boost.org/libs/regex/syntax.htm
Message -
From: Brad Roberts [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Friday, May 25, 2001 12:39 AM
Subject: RE: Regular Expressions in CF Studio
Sorry. I haven't heard of it, but that would be cool!
-Original Message-
From: Robert Everland III [mailto:[EMAIL PROTECTED
I don't think Studio covers it in the docs, but it does provide an
expression builder: right click -- Insert Expression.
Check out the Power Point tutorial from Micheal Dinowitz on
houseoffusion.com
http://www.houseoffusion.com/RegEx.ppt
Also,
http://www.houseoffusion.com/httpagent.ppt
HTH,
I am talking about using regular expressions with the find and replace
options in cfstudio, I already read Michaels help file.
Bob Everland
-Original Message-
From: Brad Roberts [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 8:04 PM
To: CF-Talk
Subject: RE: Regular Expressions
Sorry. I haven't heard of it, but that would be cool!
-Original Message-
From: Robert Everland III [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 9:21 PM
To: CF-Talk
Subject: RE: Regular Expressions in CF Studio
I am talking about using regular expressions
Badtags = "B|P|HR|PRE";
Expression = "[[:space:]]?/?[[:space:]]?(#Badtags#)[^]*";
Message = REReplaceNoCase(Message, Expression, '', 'ALL');
i'm completely new to regular expressions, but my understanding is that
they can be used to perform multiple find/replace all in one exception.
i have a
The best reference I've found is actually in the CFStudio help files...
Check under "Using ColdFusion Studio" - "12 Testing and Maintaining Web
Pages" - "Using Find and Replace"
This reference is for CF Studio, but the rules seem to be the same for the
language itself. If you want perl
Thanks. I hadn't seen MD's post.
-Original Message-
From: Bill Davidson [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 16, 2000 11:21 PM
To: CF-Talk
Subject: Re: regular expressions
umm.. Look back 2 messages... It's from Fusion Authority, so I'm sure its
good
umm.. Look back 2 messages... It's from Fusion Authority, so I'm sure its
good...
www.houseoffusion.com/httpagent.ppt
;) (I realize you may have sent this message before Michael's message
posted.)
-Bill
/intraget
- Original Message -
From: Craig Thomas [EMAIL PROTECTED]
To: CF-Talk
Hey Don, take a look at:
http://www.cfcomet.com/cfcomet/other/index.cfm?ArticleID=F0A14065-EF7A-4A9E-
AED5F28EF8C19D65
it's a pretty good resource for a beginning Reg Exer.
~Simon
Simon Horwith
Certified ColdFusion Developer
Fig Leaf Software
1400 16th St NW, # 220
Washington DC 20036
Don:
I would like to have the same thing. That is a good idea.
Greg
- Original Message -
From: "Don Smith" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Thursday, December 07, 2000 10:56 AM
Subject: Regular Expressions - Programming Interface?
Per a discussion at last
One thing I saw which was pretty cool was a web page with a form with the
fields
value to test:
regex :
It used the RE's in javascipt to do the tests, client side , no source
editing etcjust an alert box... I can't remember where it is but it
chould be replicated easy enough.
Of course I
That's a tricky one. Wizards and auto-complete tools work best for tasks
that are defined and repetetive; RE's in my experience are neither. RE's
don't have a rigid syntactical framework like programming languages. By
definition you are matching arbitrary strings. I think the best way, albeit
Here is a link to one, although I don't think it is totally 100% Perl
compatible.
http://www.funduc.com/search_replace_wizard.htm
dave
At 10:56 AM 12/7/2000 -0500, you wrote:
Per a discussion at last night's CFUG,
Is anyone aware of any programming interface that would help new programmers
On the other hand, trying to do things with JavaScript means dealing with
a. incompatibilies between various versions of IE
b. incompatibilities between various versions of Netscape
c. incompatibilities between IE and Netscape
d. incompatibilities among the other lesser used GUI based browsers
e.
CFSET variables.TextFile = REReplace(variables.TextFile, ",,", ",
,","all")
CFSET variables.TextFile = REReplace(variables.TextFile, ",,", ",
,","all")
Yeah, I did. And it worked.
But I figured it was probably better (in the long run) to ask the
"right" way of doing it in 1 RE :-)
--
If you can get away with doing it client-side, just use JavaScript. The
RegExp implementation is excellent.
tom
- Original Message -
From: "Steve Bernard" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 18, 2000 11:48 AM
Subject: RE: Regular expressions .
From: "Steve Bernard" [EMAIL PROTECTED]
etc.. Also, be prepared to be frustrated because you'll find some great
RegEx features that CF doesn't support because it has a half-ass,
third-party RegEx library bundled into it.
So what would it take to wrap code around Henry Spenser's regular
Did you try using it twice?
CFSET variables.TextFile = REReplace(variables.TextFile, ",,", ",
,","all")
CFSET variables.TextFile = REReplace(variables.TextFile, ",,", ",
,","all")
or even
CFSET variables.TextFile = REReplace(REReplace(variables.TextFile, ",,", ",
,","all"), ",,", ", ,","all")
O'Reilly has a good book on RegEx's. You'll have to weed through the parts
that don't apply though. It has sections dedicated to RegEx's in Perl, Grep,
etc.. Also, be prepared to be frustrated because you'll find some great
RegEx features that CF doesn't support because it has a half-ass,
Yes there are just a few pitfalls you have to watch out for some
parts of regular expressions do not work in CF.
-Original Message-
From: Dan Haley [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 08, 2000 6:38 PM
To: '[EMAIL PROTECTED]'
Subject: Regular expressions . . . a good
Danny Goodman's Javascript Bible has a chapter on regular expressions. Also,
the October issue of Web Techniques has a three page article.
I haven't played with regular expression and CF, so I can't answer your
second question.
Regards,
Marc Garrett
- Original Message -
From: "Dan
hi,
if this is written in perl
try...
while !(m/\input//g)
David Cummins [EMAIL PROTECTED] wrote:
Hi everybody
I've got a bit of a problem with regular expressions. We've taken over
development of a web site from other developers, and they didn't tell us
which templates are scheduled to run
Sean
[Re]Find has an optional 3rd parameter: [Start position].
You can use this to create a loop through the target of the [Re]Find.
Dick
For Example:
CFSET EOL = chr(13) chr(10)
CFSET Transformed =
"line 1" EOL
"line 2" EOL
"line 3" EOL
"line 4"
CFSET
a good way to figure
this sort of thing out.
Danny Zigrino
[EMAIL PROTECTED]
-Original Message-
From: Jonathan McGuire [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 01, 2000 9:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Regular Expressions
Try this (untested, but should be darn close):
REF
Thank you for your prompt response, however, what you suggest doesn't
work. The problem with what you suggest is, according to the CF manual,
the caret in front of a string means "the matched string must be at the
beginning of the string being searched". In order to exclude the string,
it
n I finish the book I'll know a good way to figure
this sort of thing out.
Danny Zigrino
[EMAIL PROTECTED]
-Original Message-
From: Jonathan McGuire [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 01, 2000 9:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Regular Expressions
Try this (untested, but sho
ck of where you have already searched (in place of the 1), you could
convert this to a loop that would search globally for all instances.
-Original Message-
From: Oblio Leitch [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 01, 2000 1:13 PM
To: [EMAIL PROTECTED]
Subject: RE: Regular Expressio
-Original Message-
From: Dick Applebaum [SMTP:[EMAIL PROTECTED]]
Sent: Monday, March 27, 2000 1:33 AM
To: [EMAIL PROTECTED]
Subject: Re: Regular Expressions Trouble
It works for me on CF 4.0
[snip]
At 9:11 PM -0800 3/26/2000, [EMAIL PROTECTED] wrote
98 matches
Mail list logo