Thanks to everyone. I managed to come up with one similar to Byron's example
and then tweaked it further (No spaces) so I could use it in JS on the
client and CF on the server. I knew I could do it in 2 or three steps but
wanted one step so I could hand off the regex to the client for validation.
This would do one special, 3 consecutive numbers: ajfds123jdfs#
^(?=.*\d{3})(?=.*[\~\!\@\#\$\%\^\&\*\(\)\_\+]+).{10,20}$
This would do one special, 3 numbers any position: a#bcdef2k3#4^
^(?=.*\d.*\d.*\d)(?=.*[\~\!\@\#\$\%\^\&\*\(\)\_\+]+).{10,20}$
And if your restricting to just numbers and th
>>I need one to test true for:
I doubt you can do this with only one test, but using 3 tests is easy:
>>10 to 20 Characters in length
>>3 numeric characters in any order
>>1 special character from basic list ~!@#$%^&*()_+
This should do it:
http://www.amazon.com/Adobe-Coldfusion-Anthology/d
X{10,20} means that X should exist at least 10 times but no more than 20
times
[0-9] means any single number from 0 till 9
[0-9]{3} means any 3 numbers of 0-9 one after the other
[~!@#$%^&*()_+] means a single character from the set of characters defined
between the brackets
Now do you want 3 num
Can't really help you with the regex, but regexlib.com might help you with
future ones. I use it whenever I need a regular expressions
-Original Message-
From: UXB [mailto:denn...@uxbinternet.com]
Sent: Monday, July 21, 2014 6:30 PM
To: cf-talk
Subject: Regex help maybe
I am terrible
FYI I figure it out
was simple once you looked at the content. since it is all in commented tags
ReReplaceNoCase(str,"", "", "ALL");
Just incase anyone else has this issue.
> I am having an issue creating a regex to strip out the XML content
> that Word 2007 is adding our HTML editor.
> w
This is neither here nor there, but the URLRewriteFilter can go on the
actual application server, thus negating the need for IIS or Apache
intervention, and as an added bonus, can do outbound rules as well.
This means that you don't need to change your internal links from:
index.cfm?somevar=wooho
It was on the link I posted. However after going to it again I see it's not
outputting the same as it was. Weird. I'm on chrome. Her text description
was displaying hundreds of little rectangles. Like when character encoding
is improper.
On Tue, Jul 27, 2010 at 12:28 PM, Robert Harrison <
rob...@
Hmmm. Those pages are static and
http://www.austin-williams.com/people/barbara-esposito.cfm looks fine from
here.
What are you seeing? What browser are you on?
As far as the pictures, I'm the Technology Director, not the Creative
Director. That is ground on which I do not tread :-)
Robert B
Absolutely... nd I thought it was pretty funny :-)
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: andy matthews [mailto:li...@commadelimited.com]
Sent: Monday, July 26, 2010 8:52 PM
To: cf-talk
Subject: RE: Regex Help
You know I was
Robert:
Decided I'd check out your site.
This page is messed up: http://www.austin-williams.com/people/
Barbara Espisito's mini bio is all screwy. (Ironic that she's the copy
chief.)
Looking at the source it looks like your db entry for her is mangled pretty
badly.
On another note, who took tho
> Fixing the current links within your site so that they're search engine
safe will actually break ALL of your indexed links within Google, or Yahoo,
etc.
In this case I put in a hook old so the old links still work. They do a 301
redirect to the new link schema. That should cover the search eng
> I converting all my URLs from the old variable scheme (i.e., news.cfm?id=7)
> to the stupid SEO spoonfeed urls (i.e.,
> news.cfm/this-is-my-article-for-stupid-lazy-google-programmers-who-cant-unde
> rstand-variables).
>
> I hate this. I now believe Google has supplanted Microsoft as the most evi
fter category/ and pass it to index.cfm as
verb=category&term=jQuery
andy
-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com]
Sent: Tuesday, July 27, 2010 10:24 AM
To: cf-talk
Subject: RE: Regex Help
> Why not use url rewrite instead?
If it
to:mgr...@modus.bz]
Sent: Tuesday, July 27, 2010 10:05 AM
To: cf-talk
Subject: Re: Regex Help
Why not use url rewrite instead?
This type of thing is perfect for it, plus none of your existing links will
break.
On Tue, Jul 27, 2010 at 10:55 AM, Robert Harrison <
rob...@austin-williams.com&
ustin-williams.com/unplugged
-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com]
Sent: Tuesday, July 27, 2010 11:17 AM
To: cf-talk
Subject: RE: Regex Help
> Why not use url rewrite instead?
What's that? Have a link?
Robert B. Harrison
Director of Int
http://en.wikipedia.org/wiki/Rewrite_engine
On Tue, Jul 27, 2010 at 11:17 AM, Robert Harrison <
rob...@austin-williams.com> wrote:
>
> > Why not use url rewrite instead?
>
> What's that? Have a link?
>
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy
> Why not use url rewrite instead?
What's that? Have a link?
Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100
Hauppauge NY 11788
P : 631.231.6600 Ext. 119
F : 631.434.7022
http://www.austin-williams.com
Great advertising can't be either/or
t; Great advertising can't be either/or. It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
> -Original Message-----
> From: Michael Grant [mailto:mgr...@modus.bz]
> Sent: Monday, July 26, 2010 9:15 PM
> To: cf-
can't be either/or. It must be &.
Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged
-Original Message-
From: Michael Grant [mailto:mgr...@modus.bz]
Sent: Monday, July 26, 2010 9:15 PM
To: cf-talk
Subject: Re: Regex Help
I hope he does because yo
1 PM
> To: cf-talk
> Subject: RE: Regex Help
>
>
> Sigh...
>
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -Original Message-
> From: Andy Matthews [mailto:li...@commadelimited.com]
> Sent: Monday, July 26, 2010 3:03
> Subject: RE: Regex Help
>
>
> Sigh...
>
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -Original Message-
> From: Andy Matthews [mailto:li...@commadelimited.com]
> Sent: Monday, July 26, 2010 3:03 PM
> To: cf-t
You know I was kidding right?
-Original Message-
From: Bobby Hartsfield [mailto:bo...@acoderslife.com]
Sent: Monday, July 26, 2010 6:21 PM
To: cf-talk
Subject: RE: Regex Help
Sigh...
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message
Sigh...
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Andy Matthews [mailto:li...@commadelimited.com]
Sent: Monday, July 26, 2010 3:03 PM
To: cf-talk
Subject: RE: Regex Help
[Completely irrelevant link removed]
:)
-Original
troublemaker :D
On Mon, Jul 26, 2010 at 12:02 PM, Andy Matthews wrote:
>
> http://www.cftagstore.com/tags/cfreextract.cfm
>
> :)
>
> -Original Message-
> From: Robert Harrison [mailto:rob...@austin-williams.com]
> Sent: Monday, July 26, 2010 1:00 PM
> To: cf-talk
> Subject: Regex Help
>
http://www.cftagstore.com/tags/cfreextract.cfm
:)
-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com]
Sent: Monday, July 26, 2010 1:00 PM
To: cf-talk
Subject: Regex Help
I want to replace any occurrence of multiple -- in string so the entire
string only conta
t must be &.
Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged
-Original Message-
From: Charlie Griefer [mailto:charlie.grie...@gmail.com]
Sent: Monday, July 26, 2010 2:04 PM
To: cf-talk
Subject: Re: Regex Help
rereplace( myvar, '-+', '-
OT: Isn't regex elegant? Often very cryptic but any solution where I've used
regex seems both sophisticated and simple.
As you were.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-
rereplace( myvar, '-+', '-', 'all' )
On Mon, Jul 26, 2010 at 10:59 AM, Robert Harrison <
rob...@austin-williams.com> wrote:
>
> I want to replace any occurrence of multiple -- in string so the entire
> string only contains one - in a row after filtering.
>
> Something like this does (sort of):
>
age-
From: Jason Fisher [mailto:ja...@wanax.com]
Sent: Tuesday, June 08, 2010 11:40 AM
To: cf-talk
Subject: RE: RegEx help
Debbie,
Where 'testString' is your content, try this:
#mid(testString, test.pos[2], test.len[2])#
From: "Deb
rom: Jason Fisher [mailto:ja...@wanax.com]
Sent: Tuesday, June 08, 2010 11:40 AM
To: cf-talk
Subject: RE: RegEx help
Debbie,
Where 'testString' is your content, try this:
#mid(testString, test.pos[2], test.len[2])#
From: "Debbie Morris
Debbie,
Where 'testString' is your content, try this:
#mid(testString, test.pos[2], test.len[2])#
From: "Debbie Morris"
Sent: Tuesday, June 08, 2010 10:24 AM
To: "cf-talk"
Subject: RE: RegEx help
Thanks for the help,
Rather, that would be, if you don't want the label of the field:
#mid(thestring,arFound["pos"][2],arFound["len"][2])#
Cheers,
Kris
On Tue, Jun 8, 2010 at 11:43 AM, Kris Jones wrote:
> How about something like this:
>
> refindnocase("Age:([^\r\n|\r|\n]*)[\r\n|\r|\n]",thestring,1,true) />
> #mi
How about something like this:
#mid(thestring,arFound["pos"][1],arFound["len"][1])#
Cheers,
Kris
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag
nd I think it's a she ;-)
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
>
> -Original Message-
> From: Michael Grant [mailto:mgr...@modus.bz]
> Sent: Tuesday, June 08, 2010 11:06 AM
> To: cf-talk
> Subject: Re: RegEx help
>
>
> I think h
Oh. I never saw mention of that... and I think it's a she ;-)
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Michael Grant [mailto:mgr...@modus.bz]
Sent: Tuesday, June 08, 2010 11:06 AM
To: cf-talk
Subject: Re: RegEx help
I thi
.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -Original Message-
> From: Debbie Morris [mailto:dmor...@sussexcountyde.gov]
> Sent: Tuesday, June 08, 2010 10:23 AM
> To: cf-talk
> Subject: RE: RegEx help
>
>
> Thanks for th
-Original Message-
From: Debbie Morris [mailto:dmor...@sussexcountyde.gov]
Sent: Tuesday, June 08, 2010 10:23 AM
To: cf-talk
Subject: RE: RegEx help
Thanks for the help, Jason and Andy. Turns out the character apparently
isn't a tab though. Viewing it in WireShark, it looks like th
...@wanax.com]
Sent: Monday, June 07, 2010 4:27 PM
To: cf-talk
Subject: RE: RegEx help
Assuming that those are tabs between the elements, the following will
expand on Andy's suggestion.
#mid(testString, test.pos[2], test.len[2])#
From: "Andy Ma
Assuming that those are tabs between the elements, the following will
expand on Andy's suggestion.
#mid(testString, test.pos[2], test.len[2])#
From: "Andy Matthews"
Sent: Monday, June 07, 2010 3:32 PM
To: "cf-talk"
Subjec
If you can always depend on Age: before the desired string, and what looks
like a tab afterwards, then it's trivial:
Age:[0-9a-Z]+\t
That assumes that the age will be any combination of letters and numbers,
and also allows for upper and lower case.
andy
-Original Message-
From: Debbi
Peter Boughton wrote on Wed 18/11/2009 at 03:12:
> The only time parsing HTML with RegEx might be remotely viable is when
you know
> what that code will be - if the HTML is uncontrolled then using RegEx
is a futile effort.
>
> RegEx is for dealing with Regular text, and HTML is not a Regular
lan
List wrote at 17 November 2009 14:32:
> Andy matthews, you're welcome.
Ah hah, that's a name I'm more familiar with.
> testing
Roger. And excuse the previously poorly formatted code (it looked ok at
my end before sending but occasionally in Outlook 2007 when I copy and
paste from external apps
> I have no control over this code
The only time parsing HTML with RegEx might be remotely viable is when you know
what that code will be - if the HTML is uncontrolled then using RegEx is a
futile effort.
RegEx is for dealing with Regular text, and HTML is not a Regular language -
even moder
testing
-Original Message-
From: Mark Henderson [mailto:m...@cwc.co.nz]
Sent: Monday, November 16, 2009 4:29 PM
To: cf-talk
Subject: RE: Regex help with invalid HTML
Azadi Saryev wrote on 16 November 2009 at 17:58
> you can do it with something like this:
>
> ]+>
Andy matthews, you're welcome.
-Original Message-
From: Mark Henderson [mailto:m...@cwc.co.nz]
Sent: Monday, November 16, 2009 4:29 PM
To: cf-talk
Subject: RE: Regex help with invalid HTML
Azadi Saryev wrote on 16 November 2009 at 17:58
> you can do it with something l
Azadi Saryev wrote on 16 November 2009 at 17:58
> you can do it with something like this:
>
> ]+>', '|', 'all')>
> #listfirst(cleanline, '|')# #listlast(cleanline,
'|')#
>
> and if you do not want any html in final result (not even tag),
then
> use:
> ]+>', '|', 'all')>
>
Thanks Azadi. That'
you can do it with something like this:
]+>', '|', 'all')>
#listfirst(cleanline, '|')# #listlast(cleanline, '|')#
and if you do not want any html in final result (not even tag), then
use:
]+>', '|', 'all')>
Azadi Saryev
On 16/11/2009 10:37, Mark Henderson wrote:
> Calling all regex gurus. I
lists wrote:
> Will it always be a domain name you want to keep? And will the file
size
> always be at the very end of the line?
Yes, and yes (confirmed all the TRs start on a new line).
Regards
Mark
~|
Want to reach the Cold
Will it always be a domain name you want to keep? And will the file size
always be at the very end of the line?
-Original Message-
From: Mark Henderson [mailto:m...@cwc.co.nz]
Sent: Sunday, November 15, 2009 8:38 PM
To: cf-talk
Subject: Regex help with invalid HTML
Calling all regex g
The easiest to read solution is one line:
Of course, that function will then contain a nicely spaced easy-to-read piece
of logic, which almost certainly wont be a horrible single line of nested
replaces.
~|
Want to reach t
ntly, they're rarely easy to descipher
at a glance.
Gabriel
-Original Message-
From: Tony Bentley [mailto:t...@tonybentley.com]
Sent: Friday, 14 August 2009 5:59 AM
To: cf-talk
Subject: Re: Regex Help - Can this be simplified?
You're better off using regex-replace(){rerepl
You're better off using regex-replace(){rereplace()} over replace() for more
than one condition. The pipe is a way to cheat the replace function but for
future string searching or replacing functions, try regex and you can even test
it online here:
http://www.cftopper.com/contentfiles/tools/re
There ya go. :) Just found out you can use the pipe "|" as well.
-Original Message-
From: Tony Bentley [mailto:t...@tonybentley.com]
Sent: Thursday, August 13, 2009 2:35 PM
To: cf-talk
Subject: Re: Regex Help - Can this be simplified?
rereplace(string,"
Sorry I didn't read the post very well
rereplace(form.description,"()+()+()","","all")
This does not replace a single with but I think it does the job.
~|
Want to reach the ColdFusion community with something they want?
e provider of the alternate method was just trying to help.
>
> Dave Phillips
>
> -Original Message-
> From: Charlie Griefer [mailto:charlie.grie...@gmail.com]
> Sent: Thursday, August 13, 2009 1:29 PM
> To: cf-talk
> Subject: Re: Regex Help - Can this be simplifie
rereplace(string,"()+()","","all")
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/message
2009 1:29 PM
To: cf-talk
Subject: Re: Regex Help - Can this be simplified?
less lines != simplified :)
A year from now, which version are you going to want to come back to when it
needs work? The 3 line version or the 1?
I'd
could accepta a list of chars and then replace any of
them when a match was found.
-Original Message-
From: Charlie Griefer [mailto:charlie.grie...@gmail.com]
Sent: Thursday, August 13, 2009 2:29 PM
To: cf-talk
Subject: Re: Regex Help - Can this be simplified?
less lines != simplified :)
A
less lines != simplified :)
A year from now, which version are you going to want to come back to when it
needs work? The 3 line version or the 1?
I'd prefer the 3. Easier to read.
Not really sure a regex solution is warranted here. You could probably get
one whipped up to find all instances
I'm not an expert with Regex, but you could do this:
","","all"),"","","all"),"","","all") >
Again, this is not regex, but it is a much more simplified (and faster I
believe) way of doing the same thing with 1 line of code.
Dave Phillips
-Original Message-
From: Che Vilnonis [mailto:ch.
Message-
From: Barney Boisvert [mailto:bboisv...@gmail.com]
Sent: Thursday, July 23, 2009 6:14 PM
To: cf-talk
Subject: Re: RegEx Help
How about load jquery and do
jQuery("a").click(function() {
logme(jQuery(this).attr("href"));
});
On Thu, Jul 23, 2009 at 2:04 PM, Duane B
How about load jquery and do
jQuery("a").click(function() {
logme(jQuery(this).attr("href"));
});
On Thu, Jul 23, 2009 at 2:04 PM, Duane Boudreau wrote:
>
> I need a little quick (hopefully) regex help.
>
> I have to modify all the links on a site that do not contain onclick events
>
> Here is
> I'm trying to use REFind to get all of the anchor/href tags but I'm
> coming up short.
RegEx is not necessarily the ideal tool for this - try a DOM Parser.
If you've got consistent/controlled input you can use regex, and here's a Java
one that will work in most situations:
]+?\shref\s*+=\s
On Friday 29 May 2009, Tom Jones wrote:
> If I use the following regular expression in a script it works fine, I just
> dont know with CF, I have not used much RE in CF yet.
http://txt2re.com/
--
Helping to globally grow world-class 24/7 unique partnerships as part of the
IT team of the year,
Tom, you could try this...
http://www.somedomain.com"; method="GET" result="theData">
]*[^/]?)>",
trim(theData.fileContent))>
-Original Message-
From: Tom Jones [mailto:tjo...@acworld.com]
Sent: Friday, May 29, 2009 11:03 AM
To: cf-talk
Subject: Regex help...
Hello,
I'm trying to us
Hi,
For this type of parsing, you should have a look at CF_REextract:
http://customtags.internetique.com/REextract/testREextract.cfm
~|
Want to reach the ColdFusion community with something they want? Let them know
on the House
>reFindNoCase runs a fair amount slower than reFind.
Have you compared it against using inline case-insensitive flag, i.e:
refind( '(?i)regex' , text )
Would be interesting to know if that is any faster/slower than refindnocase.
~
Ok, firstly a slight semantics rant:
Strong and Bold are NOT synonymous - just because the default styling for the
Strong tag is bold does not mean that they are interchangeable.
Now that's out of the way, onto the regex side of things - your pattern will
match this:
some.th...@where.ever
Whe
Thanks for the tips. Always helpful! I built this quickly as I only had a
few minutes. I've worked with regex for a bit.
Either way it looks as though any of these examples will work.
Thanks,
-Pat
On Fri, Jan 30, 2009 at 3:49 PM, Nathan Strutz wrote:
>
> Pat,
>
> Few tips.
> If you're going t
Pat,
Few tips.
If you're going to say or with (|), it's a few less
chars to just do <(b|strong)>.
Instead of [a-zA-Z0-9_%+-], you can get by with [\w%+-], oh, and add a
period to one of those in case there is more than 1 in the string, then
there's no need for that extra param and possible dot
This pattern should account for as well now:
|)(([A-Z0-9_%+-]*\.)+[a-z0-9_%+...@[a-z0-9.-]+\.[a-z]{2,4})(<\/b>|<\/strong>)",
string, 1, true )/>
Just amend the tag you want to wrap around the email "(|)" and
"(<\/b>|<\/strong>)" as shown above. Pipes are the "or" operators.
-Pat
On Fri, Jan 30
Try this:
)(([A-Z0-9_%+-]*\.)+[a-z0-9_%+...@[a-z0-9.-]+\.[a-z]{2,4})(<\/b>)",
string, 1, true )/>
On Fri, Jan 30, 2009 at 8:08 AM, Dean Lawrence wrote:
>
> Hi All,
>
> Can anyone help me with a particular regex patten? I am trying to find any
> email address that has at least one dot in the
so like
[\w]+\.[\...@[\w]+\.[\w]{2,5}
That's really basic, but should be easy to understand.
nathan strutz
[Blog and Family @ http://www.dopefly.com/]
[AZCFUG Manager @ http://www.azcfug.org/]
On Fri, Jan 30, 2009 at 9:08 AM, Dean Lawrence wrote:
>
> Hi All,
>
> Can anyone help me with a
Gotcha.
:)
-Original Message-
From: Will Tomlinson [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 03, 2008 9:04 AM
To: cf-talk
Subject: Re: Regex help - matching invalid xhtml
>Actually, both of your examples are "invalid" according to the W3C
>which states tha
>Actually, both of your examples are "invalid" according to the W3C which
>states that all attributes must be quoted:
>http://www.w3.org/TR/2002/REC-xhtml1-20020801/#h-4.4
The value of that variable output DOES contain quotes. I just need my regex to
do what is required by my company.
"Well, I
02/REC-xhtml1-20020801/#h-4.6
It is however a good idea to put a space before the /> for readability.
andy
-Original Message-
From: Will Tomlinson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2008 10:07 PM
To: cf-talk
Subject: Re: Regex help - matching invalid xhtml
I guess i
NVM, of course there is eh, you can auto fix them with CF right...
Dominic
2008/12/3 Dominic Watson <[EMAIL PROTECTED]>:
> Any reason not to be using the XHTML parsers out there on the produced output?
>
> Dominic
>
> 2008/12/3 Will Tomlinson <[EMAIL PROTECTED]>:
>> I guess it'd be cool if I were
Any reason not to be using the XHTML parsers out there on the produced output?
Dominic
2008/12/3 Will Tomlinson <[EMAIL PROTECTED]>:
> I guess it'd be cool if I were to use (meta|input|img) in there, to flag
> single tags without the trailing [space]/>
>
> Will
>
>
I guess it'd be cool if I were to use (meta|input|img) in there, to flag single
tags without the trailing [space]/>
Will
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
Yeah... my solution has a '+' match on the space. Glad you solved it!
On Mon, Jun 30, 2008 at 3:20 PM, Will Tomlinson <[EMAIL PROTECTED]> wrote:
> >This RegEx will tell you if there are any spaces between the parenthesis:
> >if\s*\(.*\s+.*\)\s*\{
> >
>
>
> I posted a solved post but don't see it
>This RegEx will tell you if there are any spaces between the parenthesis:
>if\s*\(.*\s+.*\)\s*\{
>
I posted a solved post but don't see it yet.
I can't use * because that flags it even if there's 0 spaces. I used + and it
works.
Thanks sonny!
Will
It just occurred to me that the any pattern matches should be non-greedy for
matching accuracy:
if\s*\(.*?\s+.*?\)\s*\{
On Mon, Jun 30, 2008 at 3:10 PM, Sonny Savage <[EMAIL PROTECTED]> wrote:
> This RegEx will tell you if there are any spaces between the parenthesis:
> if\s*\(.*\s+.*\)\s*\{
>
>
Ok, my example was wrong anyway. lol!
I figured it out. This worked:
#reFindNoCase(re, str)#
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.ne
This RegEx will tell you if there are any spaces between the parenthesis:
if\s*\(.*\s+.*\)\s*\{
Edward A Savage Jr - "Sonny"
Senior Software Engineer
Creditdiscovery, LLC
"An appeaser is one who feeds a crocodile, hoping it will eat him last." ~
Sir Winston Churchill
On Mon, Jun 30, 2008 at 2:58
I can do just one part, but if I try to make it an either/or with a pipe, it
throws me off. This works.
#reFindNoCase(re, str)#
How do I add the brackets and so it'll catch one or the other?
Thanks much,
Will
~|
Adobe® C
LOL! And here I was thinking the ~ was some kind of special character!
Sometimes if it looks like a tilde it's just a tilde :)
Thanks!
>That range matches all the characters in the ascii chart except the control
>characters. Same as saying give me all the Ascii characters from Ascii 32
>(spac
That range matches all the characters in the ascii chart except the control
characters. Same as saying give me all the Ascii characters from Ascii 32
(space) to Ascii 126 (_). I thought it was a bit more restrictive than the
dot operator.
In the [\w -~], the -w is actually redundant since \w
Two questions:
1) What does the -~ do inside the []? I haven't seen that syntax before or I'm
incredibly rusty with my regex.
2) Is your regex minimally matching? I had always thought CF was a greedy match?
Thanks,
Jeff
>Actually, please ignore my last message. I have got it to work:
>reFindN
Actually, please ignore my last message. I have got it to work:
reFindNoCase("",inputString, pos)
Thank you everybdoy for your help.
Regards,
cfcoder
> Thank you Jason, Craig and Bobby for your help which is greatly
> appreciated. However this is not quite what I want. I do apologise for
> ch
Thank you Jason, Craig and Bobby for your help which is greatly appreciated.
However this is not quite what I want. I do apologise for changing my original
requirement.
I'll try to explain.
I want to read the contents of all the .cfm files in a directory and return all
the href tags with the "
I wasn't very strict with ensuring that the string was found in
tags... although it would be simple to add if you need that... I only made
sure that it was either &productid=NUMBER or ?productID=NUMBER (regardless
of case)
I just wanted to make sure that I got a simple solution posted before anyo
Hi here is a regex that should do the job. It does a little more that you are
asking for. I felt like playing around with the regex.
(]*href=['"](([^'"]*)?([^"']ProductID=?([^&"']*)[^'"]*))['"]>([^<]*)<\/a>)
I am link 1
I am link 2
I am link 3
I am link 4
I am link 5
Text
EDIT:
The regex should be this one instead. The one above would not handle any thing
between the href="" and the closing >.
(]*href=['"](([^'"]*)?([^"']ProductID=?([^&"']*)[^'"]*))['"][^>]*>([^<]*)<\/a>)
~|
Adobe® ColdFusio
Sorry -- you only wanted it if productid was in a query string.
Try this
reFindNoCase("",inputString,
pos)
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.dou
I use the QuickREx plugin for Eclipes. Very handy. RegEx's make my brain
hurt.
http://www.bastian-bergerhoff.com/eclipse/features/web/QuickREx/toc.html
There is a stand alone version
http://www.bastian-bergerhoff.com/eclipse/features/web/QuickREx/standalone.html
--
"All you need in this lif
If tmp > 0, it's there!
reFindNoCase("",inputString, pos)
Warren Koch
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
pardon me saying this but it looks very complicated. I rather just write a
regex that will do this effortlessley.
Regards,
cfcoder
>>>I need some help with regular expressions.
>
>What you need is the kind of requirement I made CF_REextract for.
>See http://www.contentbox.com/claude/customtags/R
>>I need some help with regular expressions.
What you need is the kind of requirement I made CF_REextract for.
See http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm
~|
Adobe® ColdFusion® 8 software 8 is the
I would prefer the regular expression to do this. Can you show me how to do
what you are suggesting please?
>If you don't manage to get what you're after. Just loop over the array and
>look for the string.
>
>Adrian
>
>Hello everybody,
>
>I need some help with regular expressions.
>
>I'm trying t
1 - 100 of 447 matches
Mail list logo