RE: Regex problem.

2005-12-07 Thread Ben Nadel
. Ben Nadel Web Developer Nylon Technology 6 West 14th Street New York, NY 10011 212.691.1134 212.691.3477 fax www.nylontechnology.com "Vote for Pedro" -Original Message- From: Benjamin Paige [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 07, 2005 11:31 AM To: CF-T

RE: Regex problem.

2005-12-07 Thread Benjamin Paige
Wouldn't that replace the "(2)" as well? -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 07, 2005 11:28 AM To: CF-Talk Subject: Re: Regex problem. Good call. Better than mine. I don't think you need the parens wrapping the li

Re: Regex problem.

2005-12-07 Thread Ben Doom
Good call. Better than mine. I don't think you need the parens wrapping the literal parens, though. --Ben Ben Nadel wrote: > REReplace(strInput, "(\([0-9]+\))$", "", "ONE") > > Not tested removes ONE instance of the string ([:digit:]) that ENDS the > string ~

RE: Regex problem.

2005-12-07 Thread Ben Nadel
REReplace(strInput, "(\([0-9]+\))$", "", "ONE") Not tested removes ONE instance of the string ([:digit:]) that ENDS the string ... Ben Nadel Web Developer Nylon Technology 6 West 14th Street New York, NY 10011 212.691.1134 212.691.3477 fax www.nylontechnology.com "Vote f

RE: Regex problem.

2005-12-07 Thread Benjamin Paige
o: CF-Talk Subject: Re: Regex problem. I know that I can do this with string manipulation but I thought that the regex would be more compact and faster. Am I assuming wrong? Jeff On 12/7/05, Benjamin Paige <[EMAIL PROTECTED]> wrote: > > do you just not want to u

Re: Regex problem.

2005-12-07 Thread Ben Doom
Regex is frequently more compact. Regex is rarely faster if there's a fairly simple way to do it using standard string manipulation. As much as I love regex, I'll use a couple of standard string manipulation functions instead if possible. --Ben J W wrote: > I know that I can do this with str

Re: Regex problem.

2005-12-07 Thread J W
I know that I can do this with string manipulation but I thought that the regex would be more compact and faster. Am I assuming wrong? Jeff On 12/7/05, Benjamin Paige <[EMAIL PROTECTED]> wrote: > > do you just not want to use string manipulation? > > >

Re: Regex problem.

2005-12-07 Thread Ben Doom
Try something like: rereplace(string, "(.*)\(.*?\)", "\1"); Not tested, YMMV, and probably not very efficient. I'd probably look into more conventional string manipulation to take care of it. Like by finding all the open parens, and nixing everything from the last one on. --Ben J W wrote: >

RE: Regex problem.

2005-12-07 Thread Benjamin Paige
do you just not want to use string manipulation? -Original Message- From: J W [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 07, 2005 10:13 AM To: CF-Talk Subject: Regex problem. I have a regex brain teaser.. Well at least its teasing my brain. How do I lop off the end of a string

Re: RegEx problem

2004-10-20 Thread Andy Jarrett
There's also CF RegEx at http://www.cfregex.com/ which is "donationware" Andy www.andyjarrett.co.uk On Tue, 19 Oct 2004 19:23:16 -0400, dave <[EMAIL PROTECTED]> wrote: > http://www.regexbuddy.com/ > so thats your secret charlie ;) > > ~

Re: RegEx problem

2004-10-19 Thread Andy Jarrett
Trying to go the long way around this. You got love the fact everything is a list in CF. I used the listLast() with delimiters: "()". Cheers On Wed, 20 Oct 2004 12:18:11 +1300, Matthew Walker <[EMAIL PROTECTED]> wrote: > Untested: > reReplace(str, "[^(]*\(([^)]*)\)", "\1") > Assuming there's

RE: RegEx problem

2004-10-19 Thread dave
http://www.regexbuddy.com/ so thats your secret charlie ;) ~| This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.houseoffusion.com/banners/view.cfm?ban

RE: RegEx problem

2004-10-19 Thread Matthew Walker
Untested: reReplace(str, "[^(]*\(([^)]*)\)", "\1") Assuming there's only one set of brackets and nothing after the brackets. You could also use listLast() with delimiters: "()" > -Original Message- > From: Andy Jarrett [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 20 October 2004 12:04 p.

Re: RegEx Problem Trying to Use Matched Text

2004-09-09 Thread Ben Doom
Sorry I didn't get back to this.  I left early yesterday -- injury time. Anyway, Jeff already gave a good rundown of the classes available to you, so I'll just give an example. If you were searching for a simplified version of an email address like "[EMAIL PROTECTED]" you might look for [[:aln

Re: RegEx Problem Trying to Use Matched Text

2004-09-08 Thread Jeff Price
Josen, ColdFusion uses the POSIX regular _expression_ character sets which are listed below: alnum - the set of alpha-numeric characters alpha - the set of alphabetic characters blank - tab and space cntrl - the control characters digit - decimal digits graph - all printable characters except spa

RE: RegEx Problem Trying to Use Matched Text

2004-09-08 Thread Jason Reichenbach
Heres a regex I use for email address finding. Maybe this can get you moving in the right direction ReFindNoCase("[EMAIL PROTECTED]")>   _   From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 3:58 PM To: CF-Talk Subject: Re: RegEx Problem Trying t

Re: RegEx Problem Trying to Use Matched Text

2004-09-08 Thread Josen Ruiseco
The regex used to find the email address and the replacement regex are from the book. The reReplaceNoCase and the output stuff is me. I do not follow you with the [[:alnum:]] example. Please expound. Josen >CF5 doesn't support Perlish character classes (ie "\w"). > >IIRC, you can use [[:alnum:]]

Re: RegEx Problem Trying to Use Matched Text

2004-09-08 Thread Ben Doom
CF5 doesn't support Perlish character classes (ie "\w"). IIRC, you can use [[:alnum:]] to replace them. BTW -- are you sure this is a direct copy from the book (aside from the \1 vs $1 change)?  It looks odd in several ways to me. --Ben Josen Ruiseco wrote: > I am using the following and I ge

Re: RegEx Problem Trying to Use Matched Text

2004-09-08 Thread Josen Ruiseco
I am using the following and I get the email address twice. The second string is not a link. #newString# #newString# Am I not doing something right? I'm on CF5. Josen >In CF it is \1 : " > >Pascal > >> -Original Message- >> From: Josen Ruiseco [mailto:[EMAIL PROTECTED] >> Sent: 08 Sep

RE: RegEx Problem Trying to Use Matched Text

2004-09-08 Thread Pascal Peters
In CF it is \1 : " Pascal > -Original Message- > From: Josen Ruiseco [mailto:[EMAIL PROTECTED] > Sent: 08 September 2004 19:27 > To: CF-Talk > Subject: RegEx Problem Trying to Use Matched Text > > I am trying to follow the regex example on page 82 of Ben Forta's "regular > Expressions in

RE: RegEx Problem Trying to Use Matched Text

2004-09-08 Thread Michael Dinowitz
CF user \1 rather than $1. It should be covered in the end of the book on language differences.   _   From: Josen Ruiseco [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 08, 2004 1:27 PM To: CF-Talk Subject: RegEx Problem Trying to Use Matched Text I am trying to follow the regex examp

RE: Regex problem

2004-05-28 Thread Dave Carabetta
Ah, good catch. I misread your initial statement. >From: "Pascal Peters" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: RE: Regex problem >Date: Fri, 28 May 2004 16:41:58 +0200 > >I know, but there is a sin

RE: Regex problem

2004-05-28 Thread Pascal Peters
I know, but there is a single quote between ? and / So for this to work, it should be REReplaceNoCase(clean, '[^a-z0-9.!?''/\-" ]', '', 'all') > -Original Message- > From: Dave Carabetta [mailto:[EMAIL PROTECTED] > Sent: vrijda

RE: Regex problem

2004-05-28 Thread Dave Carabetta
That last quote within the brackets is a double quote, not a single quote typed twice. >From: "Pascal Peters" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: CF-Talk <[EMAIL PROTECTED]> >Subject: RE: Regex problem >Date: Fri, 28 May 2004 09:39:54 +0200

RE: Regex problem

2004-05-28 Thread Pascal Peters
I don't want to be picky, but this won't work. He has a single quote too in his character set! > -Original Message- > From: Dave Carabetta [mailto:[EMAIL PROTECTED] > Sent: donderdag 27 mei 2004 21:10 > To: CF-Talk > Subject: RE: Regex problem > > >I h

Re: Regex problem

2004-05-27 Thread Phillip B
Thanks. :-] Dain Anderson wrote: > Use two double quotes: > > REReplaceNoCase(clean, "[^a-z0-9.!?'/\- ""]", "", "all") > > Phillip B wrote: > > > I have this _expression_ and it works great. > > REReplaceNoCase(clean, "[^a-z0-9.!?'/\- ]", "", "all") > > Now I need to add a " to it with out it cau

RE: Regex problem

2004-05-27 Thread Dave Carabetta
>I have this _expression_ and it works great. >REReplaceNoCase(clean, "[^a-z0-9.!?'/\- ]", "", "all") >Now I need to add a " to it with out it causing an error. How do I do that? > Couldn't you just do this instead? REReplaceNoCase(clean, '[^a-z0-9.!?'/\-" ]', '', 'all') (I just changed your sur

Re: Regex problem

2004-05-27 Thread Dain Anderson
Use two double quotes: REReplaceNoCase(clean, "[^a-z0-9.!?'/\- ""]", "", "all") Phillip B wrote: > I have this _expression_ and it works great. > REReplaceNoCase(clean, "[^a-z0-9.!?'/\- ]", "", "all") > Now I need to add a " to it with out it causing an error. How do I do that? > > Phillip B >