Regex that is useful but unfortunately, my skills are pretty weak in that
area.
I use an application named The Regex Coach' to build my code. It has a
place to put the string you are trying to match and another place to put
your regex code. As you modify the regex code, it highlights how much
Be a little careful, Regex Coach works with perl regex syntax; cf
needs java syntax usually, with some differences.
I can't recommend Regex Buddy highly enough. It's not free, but it's
really quite excellent, supports a variety of different flavors.
Dave
On Thu, Nov 25, 2010 at 10:17 AM,
... since we're throwing out recommendations for our favorite so glad this
exists because of how badly I suck at reg ex apps, I've found
http://gskinner.com/RegExr/desktop/ to be a -very- valuable tool.
On Thu, Nov 25, 2010 at 8:56 AM, Dave Merrill enigm...@gmail.com wrote:
Be a little
In this situation, there is no real difference between lazy or greedy - because
the quantified item is mutually exclusive with the next characters - i.e. \s+
cannot match \) - so it will always consume to the end of the whitespace.
It is better to not assume lazy or greedy as a 'default' and
To be clear, CF uses the Apache ORO library, which is different to both Perl
and Java Regex.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
On Thu, Nov 25, 2010 at 10:48 AM, Peter Boughton wrote:
To be clear, CF uses the Apache ORO library, which is different to both Perl
and Java Regex.
I've found the QuickREx Eclipse plugin *invaluable* for regular expression work.
It supports several different regex engines, has libraries of
I am trying to replace two trailing parens )) with a single paren.
here is a sample string:
(K AAA) (N AAC) (E GAA) )
looks like there is a space in between the two )), so I tried:
cfset cleandata2 = #REReplaceNoCase( cleandata1,'\)\ \)',')','all')#
but this is not working.
Any ideas as two
no need to escape the space char with a slash.
are you sure it is only 1 space, and are you sure it is a space char
(chr(32))?
If so, remove the slash in front of the space, and it should work.
also, pet peeve, no need for the ## around the function. Works either way,
though, so ignore if you
Are you sure it's a space and not 2 spaces? Or a tab? Try using \s* to
indicate that there may be one or more space characters.
\)\s*\)
cfset cleandata2 = REReplaceNoCase(cleandata1, '\)\s*\)', ')', 'all')
On Mon, Nov 22, 2010 at 8:48 PM, Rick Colman rcol...@cox.net wrote:
I am trying to
This worked!! TNX.
On 11/22/2010 6:04 PM, Michael Dinowitz wrote:
Are you sure it's a space and not 2 spaces? Or a tab? Try using \s* to
indicate that there may be one or more space characters.
\)\s*\)
cfset cleandata2 = REReplaceNoCase(cleandata1, '\)\s*\)', ')', 'all')
On Mon, Nov 22,
to match as little as possible.
andy
-Original Message-
From: Rick Colman [mailto:rcol...@cox.net]
Sent: Monday, November 22, 2010 9:59 PM
To: cf-talk
Subject: Re: REGEX hell
This worked!! TNX.
On 11/22/2010 6:04 PM, Michael Dinowitz wrote:
Are you sure it's a space and not 2 spaces
.
andy
-Original Message-
From: Rick Colman [mailto:rcol...@cox.net]
Sent: Monday, November 22, 2010 9:59 PM
To: cf-talk
Subject: Re: REGEX hell
This worked!! TNX.
On 11/22/2010 6:04 PM, Michael Dinowitz wrote:
Are you sure it's a space and not 2 spaces? Or a tab? Try using
12 matches
Mail list logo