Why this regex takes so long?

2014-10-02 Thread Claude Schnéegans
Hi, I'm having a problem with a scheduled task that chokes my server. Its role is to analyse bounced messages. I have been able to identify where it blocks, when analysing a line like this one with the regex below: Message-id: 26823262.22036.1411993378646.JavaMail.NS4007563$@127.0.0.1 CFSET

Re: Why this regex takes so long?

2014-10-02 Thread Byron Mann
Think this has something to do with the Regex itself. I stink at them; however try plugging it in here: http://regex101.com/ It returns something about catastrophic backtracking. You may want something like this: [A-Z0-9]*@ On Thu, Oct 2, 2014 at 11:51 AM, wrote: Hi, I'm having a problem

Re: Why this regex takes so long?

2014-10-02 Thread Claude Schnéegans
however try plugging it in here: It gives me the same result: Timout for PHP and Python (after about 3 sec) and a result in Javascript in about 4 sec, because it happens in my computer and there is no time out. It looks like the problem is really in the regEx itself. I'll try to get another

protection from sql attacks with regex++

2014-08-15 Thread Stephens, Larry V
Using information from a Ben Nadel atricle, jsStringFormat( htmlEditFormat()) seems to be catching insertions like b and escaping them. However, I have tried a number of regex routines from http://www.symantec.com/connect/articles/detection-sql-injection-and-cross-site-scripting-attacks plus

RE: protection from sql attacks with regex++

2014-08-15 Thread Robert Harrison
-williams.com/blog Twitter: http://www.twitter.com/austin_williams -Original Message- From: Stephens, Larry V [mailto:steph...@iu.edu] Sent: Friday, August 15, 2014 1:51 PM To: cf-talk Subject: protection from sql attacks with regex++ Using information from a Ben Nadel atricle, jsStringFormat

Re: protection from sql attacks with regex++

2014-08-15 Thread Casey Dougall - Uber Website Solutions
to be catching insertions like b and escaping them. However, I have tried a number of regex routines from http://www.symantec.com/connect/articles/detection-sql-injection-and-cross-site-scripting-attacks plus another from a CF article that I can't place at the moment, to catch statements like select

RE: protection from sql attacks with regex++

2014-08-15 Thread Stephens, Larry V
Doing that on everything. -Original Message- From: Robert Harrison [mailto:rob...@austin-williams.com] Sent: Friday, August 15, 2014 1:54 PM To: cf-talk Subject: RE: protection from sql attacks with regex++ Uhm... cfqueryparam Robert Harrison Director of Interactive Services

Re: protection from sql attacks with regex++

2014-08-15 Thread Justin Scott
Doing that on everything. If you're parametrizing everything on the queries then what is the concern? -Justin ~| Order the Adobe Coldfusion Anthology now!

RE: Regex help maybe

2014-07-22 Thread UXB
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

Regex help maybe

2014-07-21 Thread UXB
I am terrible at Regex's. I looked all over and am going blind. Is there anyone here that can shorted my search? I need one to test true for: 10 to 20 Characters in length 3 numeric characters in any order 1 special character from basic list ~!@#$%^*()_+ Any help is appreciated. Dennis

RE: Regex help maybe

2014-07-21 Thread Duane Boudreau
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

Re: Regex help maybe

2014-07-21 Thread Michael Dinowitz
numbers one after the other or that there should be 3 numbers in the string total? Can you send a few example strings or talk about how it will be used? Also, do you want a single regex to do it all or can be it be in 2-3 steps (easiest)? On Mon, Jul 21, 2014 at 5:29 PM, UXB denn...@uxbinternet.com

Re: Regex help maybe

2014-07-21 Thread Claude Schnéegans
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: CFSET stringOK = (len(form.text) GTE 20 AND len(form.text)

Re: Regex help maybe

2014-07-21 Thread Byron Mann
and the special chars outline, replace the last . in either to this. [\d\~\!\@\#\$\%\^\\*\(\)\_\+] So like this in the second variant: ^(?=.*\d.*\d.*\d)(?=.*[\~\!\@\#\$\%\^\\*\(\)\_\+]+)[\d\~\!\@\#\$\%\^\\*\(\)\_\+]{10,20}$ Plenty of online regex testers as well so you don't have to keep coding it up

Re: Regex question

2013-07-17 Thread Cameron Childress
a superscript tag with the value. I'll let someone else help with regex, but my comment from the peanut gallery: This smells like something you may be able to easily do using jQuery and let the client side manage this. -Cameron -- Cameron Childress -- p: 678.637.5072 im: cameroncf facebook http

Regex question

2013-07-17 Thread Matthew Allen
I have a body of text as below: body body body bodybodybody bodybody body body reference-link id=1 type=reference/ body body body reference-link id=2 type=reference/body body body bodybody body body body body Is it possible to change the reference-link tag from a reference link tag

Need RegEx help for unknown/odd characters.

2013-05-17 Thread Che Vilnonis
Good afternoon. Occasionally when parsing a RSS feed, I get RSS data I cannot parse. Click for screenshot below (text highlighted in green). In this example, Montreal should return Montréal but does not. What regex could I use to remove or replace such odd characters? http://www.asitv.com/images

Re: Need RegEx help for unknown/odd characters.

2013-05-17 Thread Nathan Strutz
(text highlighted in green). In this example, Montreal should return Montréal but does not. What regex could I use to remove or replace such odd characters? http://www.asitv.com/images/_funkychar.jpg Thanks, Che ~| Order

RE: Need RegEx help for unknown/odd characters.

2013-05-17 Thread Che Vilnonis
(text highlighted in green). In this example, Montreal should return Montréal but does not. What regex could I use to remove or replace such odd characters? http://www.asitv.com/images/_funkychar.jpg ~| Order the Adobe

Re: Need RegEx help for unknown/odd characters.

2013-05-17 Thread Kris Jones
). In this example, Montreal should return Montréal but does not. What regex could I use to remove or replace such odd characters? http://www.asitv.com/images/_funkychar.jpg ~| Order the Adobe Coldfusion Anthology now

Need RegEx help for unknown/odd characters.

2013-05-16 Thread Che Vilnonis
Good morning. Occasionally when parsing a RSS feed, I get RSS data I cannot parse. Click for screenshot below (text highlighted in green). In this example, Montreal should return Montréal but does not. What regex could I use to remove or replace such odd characters? http://www.asitv.com/images

Struggling to code accents into a cfinput regex pattern

2012-10-01 Thread John Pullam
I am still trying to code a regex pattern for my cfinput that accepts the usual accented characters you find in languages such as French. I need something that allows people to enter their names when they contain accented characters. I realize that names can be even broader than this but I am

Re: Struggling to code accents into a cfinput regex pattern

2012-10-01 Thread John Pullam
I think I just answered my own question from another post I read. I am now using this pattern=^[a-zA-Z\u00E0-\u00FC'\-\ ]{1,50}$ and it seems to do the job. ~| Order the Adobe Coldfusion Anthology now!

Re: How do you allow accented characters in a cfinput regex?

2012-09-18 Thread John Pullam
OK, I think I tried what you suggested--here is exactly what I did: Added this to the page: cfprocessingdirective pageencoding=utf-8 Made the cfinput: cfinput type=text name=FName required=yes size=30 validate=regex pattern=[:alpha:] message=Please enter a valid First Name This now

Re: How do you allow accented characters in a cfinput regex?

2012-09-17 Thread Russ Michaels
Did you try setlocale on the string as per previous example? Regards Russ Michaels On Sep 17, 2012 3:56 AM, John Pullam jpul...@mcleansystems.com wrote: When I use this pattern=^[[:alpha:]'\-\ ]{2,50}$ nothing validates. Is that what you meant?

Re: How do you allow accented characters in a cfinput regex?

2012-09-17 Thread John Pullam
Did you try setlocale on the string as per previous example? Sorry but I'm not clear on how I would use that, so please help me understand. For background information, this is a form field coming in to a CFFORM that I am checking with CFINPUT regex validation. I don't want to force someone

Re: How do you allow accented characters in a cfinput regex?

2012-09-17 Thread Paul Hastings
On 9/17/2012 9:23 PM, John Pullam wrote: Did you try setlocale on the string as per previous example? not needed in this instance. did swapping [:alpha:] for \w in the regex expression work or not? if not, what version of cf

Re: How do you allow accented characters in a cfinput regex?

2012-09-17 Thread John Pullam
did swapping [:alpha:] for \w in the regex expression work or not? if not, what version of cf? No, it started rejecting all names when I did that. I am running CF9. ~| Order the Adobe Coldfusion Anthology now! http

Re: How do you allow accented characters in a cfinput regex?

2012-09-17 Thread Paul Hastings
On 9/18/2012 7:31 AM, John Pullam wrote: No, it started rejecting all names when I did that. I am running CF9. you're doing it wrong: cfprocessingdirective pageencoding=utf-8 cfscript x=Tá mé in ann gloine a ithe; Ní chuireann sé isteach nó amach orm.; writeoutput('reFind

Re: How do you allow accented characters in a cfinput regex?

2012-09-17 Thread Paul Hastings
On 9/18/2012 11:05 AM, Paul Hastings wrote: x=T� m� in ann gloine a ithe; N� chuireann s� isteach n� amach orm.; that didn't come through so good, grab one of the test phrases from http://www.sustainablegis.com/unicode/

How do you allow accented characters in a cfinput regex?

2012-09-16 Thread John Pullam
I've read a whole bunch and tried many things but I can't seem to get my regex pattern to allow accented characters, which will occur in people's names. My cfinput currently looks like this: cfinput type=text name=FName required=yes size=30 validate=regex pattern=^[\w'\-\ ]{2,50}$ message

Re: How do you allow accented characters in a cfinput regex?

2012-09-16 Thread Russ Michaels
http://www.regular-expressions.info/unicode.html It is possible that cf regex doesn't support unicode, so you should perform some basic tests to confirm that, plus make sure the string your testing is in unicode format Regards Russ Michaels On Sep 16, 2012 3:45 PM, John Pullam jpul

Re: How do you allow accented characters in a cfinput regex?

2012-09-16 Thread John Pullam
Sorry I don't know how to do that. How do you put a string in unicode format? http://www.regular-expressions.info/unicode.html It is possible that cf regex doesn't support unicode, so you should perform some basic tests to confirm that, plus make sure the string your testing is in unicode format

Re: How do you allow accented characters in a cfinput regex?

2012-09-16 Thread Brian Thornton
John, Larry had a great post on this a while ago.. http://www.larryullman.com/forum/read.php?19,44246 Thanks, Brian On Sep 16, 2012 10:45 AM, John Pullam jpul...@mcleansystems.com wrote: I've read a whole bunch and tried many things but I can't seem to get my regex pattern to allow

Re: How do you allow accented characters in a cfinput regex?

2012-09-16 Thread John Pullam
Most if the stuff in that post refer to more general regex processing, not the ColdFusion implementation. When I tried his syntax, CF failed with errors because it doesn't appear to be recognized. ~| Order the Adobe

Re: How do you allow accented characters in a cfinput regex?

2012-09-16 Thread Paul Hastings
On 9/16/2012 9:45 PM, John Pullam wrote: cfinput type=text name=FName required=yes size=30 validate=regex pattern=^[\w'\-\ ]{2,50}$ message=Please enter a valid First Name change \w to [:alpha:] ~| Order the Adobe

Re: How do you allow accented characters in a cfinput regex?

2012-09-16 Thread John Pullam
When I use this pattern=^[[:alpha:]'\-\ ]{2,50}$ nothing validates. Is that what you meant? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion

Re: More Complicated RegEx Replace

2012-07-02 Thread Peter Boughton
This is the replace statement a regex guru gave me to wrap a variable found in a string in a span tag. Not sure you can call them a guru when the only piece of regex used is a pair of parentheses which are entirely unnecessary. *shrug* Here's a simpler version that does exactly the same

More Complicated RegEx Replace

2012-06-28 Thread Robert Harrison
This is the replace statement a regex guru gave me to wrap a variable found in a string in a span tag. # REReplaceNoCase(answer, '(#search_string#)', 'span class=keyword\1/span', 'all')# It works great, but the variable contains html and it's also replacing stuff

Re: More Complicated RegEx Replace

2012-06-28 Thread Claude Schnéegans
I doubt you can achieve this just using regex. Regex are great for doing things, but not for not doing. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag

Re: More Complicated RegEx Replace

2012-06-28 Thread Matt Quackenbush
, Jun 28, 2012 at 9:26 AM, wrote: I doubt you can achieve this just using regex. Regex are great for doing things, but not for not doing. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion

CFHTTP Regex... I'm horrible at regex

2012-05-31 Thread Roger Anthony
I'm trying to pull total impressions from the administration screens on a Xerox printer but for the life of me can't seem to get the regex right. I'm thinking the Less Than and Greater Than signs are what's tripping me up, but as frustrated as I am at the moment I can't tell you for sure. So

Re: CFHTTP Regex... I'm horrible at regex

2012-05-31 Thread .jonah
Here's a rad tool for extracting regex patterns: http://txt2re.com/ It even outputs CF code. (I't output is pretty generic, but is a good staring point and gives nice insight into how RE works.) .jonah On 5/31/12 1:10 PM, Roger Anthony wrote: I'm trying to pull total impressions from

Re: CFHTTP Regex... I'm horrible at regex

2012-05-31 Thread Michael Dinowitz
Anthony d...@anthony2.net wrote: I'm trying to pull total impressions from the administration screens on a Xerox printer but for the life of me can't seem to get the regex right. I'm thinking the Less Than and Greater Than signs are what's tripping me up, but as frustrated as I am

Regex for High Ascii Chars

2012-04-17 Thread Che Vilnonis
Hello all. I'm dealing with a API where some of the results are populated with certain Ascii characters in order to get higher sorting results. For example, some of the characters I'm finding are: 8635 or 9606 or 9658 or 9668 or 9734 or 9835 Is there a regex that could remove all

Re: Regex for High Ascii Chars

2012-04-17 Thread Azadi Saryev
finding are: 8635 or 9606 or 9658 or 9668 or 9734 or 9835 Is there a regex that could remove all of these characters at once w/o having to maintain an ever growing list of them? TIA, Che ~| Order the Adobe Coldfusion

Re: RegEx Question

2011-05-20 Thread Peter Boughton
Not only can you do it with jQuery, you /should/ do it with jQuery (or equiv). Regex is not built for HTML parsing, and there are many reasons why it wont work correctly when you try. Rather than worry about numerous edge cases, use a tool designed for the job from the start

RE: RegEx Question

2011-05-19 Thread Duane Boudreau
Thanks that's brilliant! -Original Message- From: Dominic Watson [mailto:watson.domi...@googlemail.com] Sent: Wednesday, May 18, 2011 5:42 AM To: cf-talk Subject: Re: RegEx Question Here is a very blunt regex that should match the opening tag (does not check for the lack of target

Re: RegEx Question

2011-05-18 Thread Dominic Watson
Here is a very blunt regex that should match the opening tag (does not check for the lack of target=_blank: a.*?href=.*?\.pdf.*? Here's a great site: http://gskinner.com/RegExr/ On 18 May 2011 02:30, Lists li...@commadelimited.com wrote: You could actually do this with jquery quite easily

RegEx Question

2011-05-17 Thread Duane Boudreau
Hi All, First time posting in a very long time. I'm stuck on a RegEx problem that I can't wrap my head around. I need to have a block of html and I need to add target=_blank to any hyperlink that has a pdf link in it. Any suggestions? Here is the match string I tried so far but I don't think

Re: RegEx Question

2011-05-17 Thread Lists
stuck on a RegEx problem that I can't wrap my head around. I need to have a block of html and I need to add target=_blank to any hyperlink that has a pdf link in it. Any suggestions? Here is the match string I tried so far but I don't think I'm even close. a\\s[^]*href=['\\\]( (?i:)(?:jpg|gif

Regex Question

2011-04-28 Thread Rick Colman
input looks like: (A XXX)(B YYY)(C ZZZ) I need to pull out: XXXYYYZZZ ... Can somebody help? TNX. Rick. ~| Order the Adobe Coldfusion Anthology now!

Re: Regex Question

2011-04-28 Thread Charlie Griefer
Could be as simple as \w{3} Would that do it (searching for 3 consecutive word characters)? -- Charlie Griefer http://charlie.griefer.com I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success. On Thursday, April 28, 2011 at 10:10

RE: Regex Question

2011-04-28 Thread Jenny Gavin-Wear
- From: Rick Colman [mailto:rcol...@cox.net] Sent: 28 April 2011 18:10 To: cf-talk Subject: Regex Question input looks like: (A XXX)(B YYY)(C ZZZ) I need to pull out: XXXYYYZZZ ... Can somebody help? TNX. Rick. ~| Order

Re: Regex Question

2011-04-28 Thread Andy Matthews
That seems like it might do the trick: http://regexr.com?2tl99 Could be as simple as \w{3} Would that do it (searching for 3 consecutive word characters)? -- Charlie Griefer http://charlie.griefer.com I have failed as much as I have succeeded. But I love my life. I love my wife.

Re: Regex Question

2011-04-28 Thread Rick Colman
would it ignore the parens and space? will try shortly. TNX! On 4/28/2011 1:17 PM, Andy Matthews wrote: That seems like it might do the trick: http://regexr.com?2tl99 Could be as simple as \w{3} Would that do it (searching for 3 consecutive word characters)? -- Charlie Griefer

Regex help needed

2011-02-14 Thread Matthew Friedman
I am having an issue creating a regex to strip out the XML content that Word 2007 is adding our HTML editor. we are using TINYMEC and when one of our client upgraded recently it has created a large number of issues. what we need to do is to pull out the flowing content. it starts

Re: Regex help needed

2011-02-14 Thread Matthew Friedman
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

Re: Regex to strip out non-numerics but leave decimal point

2011-01-19 Thread Nando
should be good to go. From: Nando d.na...@gmail.com Sent: Tuesday, January 18, 2011 2:09 PM To: cf-talk cf-talk@houseoffusion.com Subject: Regex to strip out non-numerics but leave decimal point I'm trying to strip out all non-numeric

Regex to strip out non-numerics but leave decimal point

2011-01-18 Thread Nando
I'm trying to strip out all non-numeric characters from some fields. The catch is I need the regex to leave in the decimal point, cuz these are rates that include cents. rereplace(rc.hourlyRateInvoicedToClient,'[^[:digit:]]','','all') I'm not sure how to work something like [^\.] into it. Can

re: Regex to strip out non-numerics but leave decimal point

2011-01-18 Thread Jason Fisher
-talk@houseoffusion.com Subject: Regex to strip out non-numerics but leave decimal point I'm trying to strip out all non-numeric characters from some fields. The catch is I need the regex to leave in the decimal point, cuz these are rates that include cents. rereplace

Re: Regex to strip out non-numerics but leave decimal point

2011-01-18 Thread Nando
. From: Nando d.na...@gmail.com Sent: Tuesday, January 18, 2011 2:09 PM To: cf-talk cf-talk@houseoffusion.com Subject: Regex to strip out non-numerics but leave decimal point I'm trying to strip out all non-numeric characters from some fields. The catch is I need the regex to leave

Re: Regex to strip out non-numerics but leave decimal point

2011-01-18 Thread Nathan Strutz
, January 18, 2011 2:09 PM To: cf-talk cf-talk@houseoffusion.com Subject: Regex to strip out non-numerics but leave decimal point I'm trying to strip out all non-numeric characters from some fields. The catch is I need the regex to leave in the decimal point, cuz these are rates that include cents

Monster Regex

2010-12-06 Thread Rick Colman
Been whacking at this one for a while, and it eludes me. ((T ACC) (I ATT) (T ACT) (P CCA) (E GAA) (T ACT) (S TCC) (R CGT) (P CCA) (I ATC) ;0-9 (T ACT) (M ATG) (D GAT) (H CAC) (L CTG) (E GAG) (K AAA) (N AAC) (E GAA) ;1210-1218) remove only single leading paren ( remove only trailing single

Re: Monster Regex

2010-12-06 Thread Jacob Munson
cfset str = reReplace(str,^\(,) cfset str = reReplace(str,;\d+-\d+\),) On Mon, Dec 6, 2010 at 12:03 PM, Rick Colman rcol...@cox.net wrote: Been whacking at this one for a while, and it eludes me. ((T ACC) (I ATT) (T ACT) (P CCA) (E GAA) (T ACT) (S TCC) (R CGT) (P CCA) (I ATC) ;0-9 (T ACT)

re: Monster Regex

2010-12-06 Thread Jason Fisher
Try this, where x is your original string: clean = replaceList(reReplace(x, \s*;\d+-\d+, , all), ((,)), (,)) From: Rick Colman rcol...@cox.net Sent: Monday, December 06, 2010 2:04 PM To: cf-talk cf-talk@houseoffusion.com Subject: Monster Regex Been

Re: Monster Regex

2010-12-06 Thread Rick Colman
this mostly worked, but did not remove one of the last trailing double )) results like: (T ACT) (N AAC) (D GAT) (T ACT) (A GCT) (T ACT) (M ATG) (D GAT) (H CAC) (L CTG) (E GAG) (K AAA) (N AAC) (E GAA) ) On 12/6/2010 11:26 AM, Jason Fisher wrote: clean = replaceList(reReplace(x, \s*;\d+-\d+, ,

Re: Monster Regex

2010-12-06 Thread Rick Colman
this removed the leading parent, but did not remove the ;xxx-yyy numbers at the end of each line or the final trailing paren ) like (T ACT) (M ATG) (D GAT) (H CAC) (L CTG) (E GAG) (K AAA) (N AAC) (E GAA) ;1210-1218 ) On 12/6/2010 11:16 AM, Jacob Munson wrote: cfset str = reReplace(str,^\(,)

Re: Monster Regex

2010-12-06 Thread Jason Fisher
@houseoffusion.com Subject: Re: Monster Regex this mostly worked, but did not remove one of the last trailing double )) results like: (T ACT) (N AAC) (D GAT) (T ACT) (A GCT) (T ACT) (M ATG) (D GAT) (H CAC) (L CTG) (E GAG) (K AAA) (N AAC) (E GAA) ) On 12/6/2010 11:26 AM, Jason Fisher wrote

Re: Monster Regex

2010-12-06 Thread Jacob Munson
It worked in my test, but I now notice that you've got a space before the trailing parens. Try this for the second code bit: cfset str = reReplace(str,;\d+-\d+\s*\),) Sent with my Droid On Dec 6, 2010 1:34 PM, Rick Colman rcol...@cox.net wrote: this removed the leading parent, but did not

Re: Monster Regex

2010-12-06 Thread Rick Colman
) From: Rick Colmanrcol...@cox.net Sent: Monday, December 06, 2010 3:28 PM To: cf-talkcf-talk@houseoffusion.com Subject: Re: Monster Regex this mostly worked, but did not remove one of the last trailing double )) results like: (T ACT) (N AAC) (D GAT) (T ACT) (A GCT) (T ACT) (M ATG

Re: Monster Regex

2010-12-06 Thread Jason Fisher
-talk cf-talk@houseoffusion.com Subject: Re: Monster Regex getting malformed regular expression )\s*) thank you ! On 12/6/2010 12:41 PM, Jason Fisher wrote: Just add a space checker inside the '))', then, something like this: clean = reReplace(replace(reReplace(x, \s*;\d+-\d+, , all

Re: Monster Regex

2010-12-06 Thread Rick Colman
Colmanrcol...@cox.net Sent: Monday, December 06, 2010 3:55 PM To: cf-talkcf-talk@houseoffusion.com Subject: Re: Monster Regex getting malformed regular expression )\s*) thank you ! On 12/6/2010 12:41 PM, Jason Fisher wrote: Just add a space checker inside the '))', then, something like

Regex Question

2010-12-03 Thread Robert Harrison
Regex is not my strong suit, but someone may know this off the top of their head. If I have a long url like: http://www.mysite.com/item1/option2/part3/section4 I can use cgi.path_info to get the /item1/option2/part3/section4 part of the string. Now is there an easy regex

Re: Regex Question

2010-12-03 Thread Carl Von Stetten
Robert, How about treating CGI.path_info as a list, using / as your delimiter. Then you can use the various list* functions in CF to parse it however you want. Carl On 12/3/2010 9:26 AM, Robert Harrison wrote: Regex is not my strong suit, but someone may know this off the top

Re: Regex Question

2010-12-03 Thread Jason Fisher
Stetten vonner.li...@vonner.net Sent: Friday, December 03, 2010 12:36 PM To: cf-talk cf-talk@houseoffusion.com Subject: Re: Regex Question Robert, How about treating CGI.path_info as a list, using / as your delimiter. Then you can use the various list* functions in CF to parse it however you want

RE: Regex Question

2010-12-03 Thread Robert Harrison
listGetAt(cgi.path_info, 2, /) Great. That will work for what I want. I want to be able to pass the cgi.path_info to a CFC and pass a digit so the CFC could extract the part of the string I want to do a query... I'm using long URLs to pass variables more and more these days, as opposed to

RE: Regex Question

2010-12-03 Thread Jason Fisher
...@austin-williams.com Sent: Friday, December 03, 2010 1:03 PM To: cf-talk cf-talk@houseoffusion.com Subject: RE: Regex Question listGetAt(cgi.path_info, 2, /) Great. That will work for what I want. I want to be able to pass the cgi.path_info to a CFC and pass a digit so the CFC could extract

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
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, Jerry Barnes critic

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

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
For future reference you should avoid using * where possible as it can easily lead to overmatching. Even using + would be better although both + and * alone are greedy matches. An even better solution would be to use a lazy match like so: \)\s+?\) The ? following the + tells the regex engine

Re: REGEX hell

2010-11-22 Thread Michael Dinowitz
avoid using * where possible as it can easily lead to overmatching. Even using + would be better although both + and * alone are greedy matches. An even better solution would be to use a lazy match like so: \)\s+?\) The ? following the + tells the regex engine to match as little as possible

Regex to parse cfhttp.filecontent?

2010-11-04 Thread Marie Taylore
Hi all, I need help in parsing returned cfhttp.filecontent contents. I need to find the line with AUTHORIZATION RESULT: and then get all the text that follows on that same line. I'm sure there's a simple way to do that with ReFind, but I'm a Regex idiot. Any help would be appreciated

RE: Regex to parse cfhttp.filecontent?

2010-11-04 Thread andy matthews
, November 04, 2010 6:51 PM To: cf-talk Subject: Regex to parse cfhttp.filecontent? Hi all, I need help in parsing returned cfhttp.filecontent contents. I need to find the line with AUTHORIZATION RESULT: and then get all the text that follows on that same line. I'm sure there's a simple way

HELP!!! REgEx, XML and a Qutation Mark

2010-11-02 Thread Michael Grove
I am trying to export our product list to an XML feed. It works pretty well except that one of the products, has a quotation mark in it that nothing seems to like. I believe it is a cut and past issue and that the quotation mark is a special character. It is this one right here ” No

RE: HELP!!! REgEx, XML and a Qutation Mark

2010-11-02 Thread Justin Scott
I am trying to export our product list to an XML feed. It works pretty well except that one of the products, has a quotation mark in it that nothing seems to like. It is this one right here ” I believe that's a fancy quote likely pasted from Word or some other word processing

Quick Regex Question

2010-10-29 Thread Robert Harrison
I have the regex statement - ReReplace(new_dir,\W,,all) That removes all non-alphanumeric characters from a sting. If I want to remove all non-alphanumeric characters except the underscore, is that:ReReplace(new_dir,\W/_,,all) or ? Thanks Robert B. Harrison Director of Interactive

NEVER MIND: Quick Regex Question

2010-10-29 Thread Robert Harrison
- ReReplace(new_dir,\W,,all) is any alphanumeric character and the _ Never Mind. Thanks 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

Re: Quick Regex Question

2010-10-29 Thread Nathan Strutz
wrote: I have the regex statement - ReReplace(new_dir,\W,,all) That removes all non-alphanumeric characters from a sting. If I want to remove all non-alphanumeric characters except the underscore, is that:ReReplace(new_dir,\W/_,,all) or ? Thanks Robert B. Harrison Director

Re: Quick Regex Question

2010-10-29 Thread CDCaveman
unsubscribe In a message dated 10/29/2010 10:41:43 A.M. Eastern Daylight Time, rob...@austin-williams.com writes: I have the regex statement - ReReplace(new_dir,\W,,all) That removes all non-alphanumeric characters from a sting. If I want to remove all non-alphanumeric characters

Re: RegEx: Grabbing Keywords from Referers

2010-08-24 Thread Peter Boughton
cfset keywords = reMatchNoCase([?|][p|q]=[^]+, referer) This is incorrect - the | is a literal in character classes. You want [?][pq]=[^]+ ~| Order the Adobe Coldfusion Anthology now!

RE: RegEx: Grabbing Keywords from Referers

2010-08-24 Thread Che Vilnonis
Thanks for the update Peter. -Original Message- From: Peter Boughton [mailto:bought...@gmail.com] Sent: Tuesday, August 24, 2010 4:58 AM To: cf-talk Subject: Re: RegEx: Grabbing Keywords from Referers cfset keywords = reMatchNoCase([?|][p|q]=[^]+, referer) This is incorrect

  1   2   3   4   5   6   7   8   9   10   >