Re: REGEX hell

2010-11-25 Thread Jerry Barnes
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

Re: REGEX hell

2010-11-25 Thread Dave Merrill
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,

Re: REGEX hell

2010-11-25 Thread Charlie Griefer
... 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

Re: REGEX hell

2010-11-25 Thread Peter Boughton
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

Re: REGEX hell

2010-11-25 Thread Peter Boughton
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

Re: REGEX hell

2010-11-25 Thread denstar
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

REGEX hell

2010-11-22 Thread Rick Colman
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

Re: REGEX hell

2010-11-22 Thread Jerry Johnson
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

Re: REGEX hell

2010-11-22 Thread Michael Dinowitz
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

Re: REGEX hell

2010-11-22 Thread Rick Colman
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,

RE: REGEX hell

2010-11-22 Thread andy matthews
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

Re: REGEX hell

2010-11-22 Thread Michael Dinowitz
. 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