RE: regex help

2008-02-15 Thread Bobby Hartsfield
I wasn't very strict with ensuring that the string was found in a/a 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

RE: Regex help with search strings

2007-07-27 Thread Mark Henderson
Bobby Hartsfield wrote: My brother's name is Justin William Eugene Mckinney III. That might throw you for a loop. It will really throw you for a loop when it is Justin William Eugene Mckinney III PHD Or Dr. Justin William Eugene Mckinney III Hi Bobby Yep, I considered this type of thing

Re: Regex help with search strings

2007-07-26 Thread Ben Doom
You could do this with a regex but it would be easier and more efficient to do it with listfind() using a space as the delimiter. --Ben Doom Mark Henderson wrote: Hi I have a search box that currently contains only one field. I normally have one input for first name, one for lat name and

Re: Regex help with search strings

2007-07-26 Thread Jide Aliu
From what you're saying, you probably might not need Regex. How about GetToken? cfset SearchField = Joe Bloggs cfset var1 = GetToken(trim(SearchField), 1, ) cfset var2 = GetToken(trim(SearchField), 2, ) Am I barking up the wrong tree?

RE: Regex help with search strings

2007-07-26 Thread Bobby Hartsfield
My brother's name is Justin William Eugene Mckinney III. That might throw you for a loop. It will really throw you for a loop when it is Justin William Eugene Mckinney III PHD Or Dr. Justin William Eugene Mckinney III Simply taking listfirst() and listlast() delimited by a space won't always

RE: Regex help with search strings

2007-07-26 Thread Mark Henderson
From: Ben Doom Sent: Friday, 27 July 2007 2:17 a.m. To: CF-Talk Subject: Re: Regex help with search strings You could do this with a regex but it would be easier and more efficient to do it with listfind() using a space as the delimiter. Hi Ben. I worked it out using a regex but I

RE: Regex help with search strings

2007-07-26 Thread Mark Henderson
From: Mark Henderson Sent: Thursday, 26 July 2007 10:19 a.m. To: CF-Talk Subject: Regex help with search strings Hi I have a search box that currently contains only one field. I normally have one input for first name, one for lat name and so on, which makes the task of searching

RE: Regex help looking for a name in a string.

2007-04-27 Thread Gaulin, Mark
Is there a delimited in the list of names (work_string), something that you can include in your reg ex to anchor it to an entire entry? Mark -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 5:27 AM To: CF-Talk Subject: Regex help looking

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Reorder by length so the longer names come first. Also, I think you only need replace(works_string, artist, a href='profiles.cfm?e=#profileID#' target='artistWin'#artist#/a, all) -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 5:27 AM To:

Re: Regex help looking for a name in a string.

2007-04-27 Thread Zaphod Beeblebrox
It does really look like your using Regex's. Since you're looking for strings essentially, can't you just use ReplaceNoCase? On 4/27/07, Will Swain [EMAIL PROTECTED] wrote: Ok, no doubt this is an easy RegEx question, but not for me. I have two queries. One returns a set of names, the other a

Re: Regex help looking for a name in a string.

2007-04-27 Thread Zaphod Beeblebrox
that should be It doesn't really look like your using Regex's On 4/27/07, Zaphod Beeblebrox [EMAIL PROTECTED] wrote: It does really look like your using Regex's. Since you're looking for strings essentially, can't you just use ReplaceNoCase? On 4/27/07, Will Swain [EMAIL PROTECTED] wrote:

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
[mailto:[EMAIL PROTECTED] Sent: 27 April 2007 13:27 To: CF-Talk Subject: RE: Regex help looking for a name in a string. Is there a delimited in the list of names (work_string), something that you can include in your reg ex to anchor it to an entire entry? Mark -Original Message

Re: Regex help looking for a name in a string.

2007-04-27 Thread James Holmes
Are the names delimited by something (like commas) or just strung together? On 4/27/07, Will Swain wrote: Ok, no doubt this is an easy RegEx question, but not for me. I have two queries. One returns a set of names, the other a string which may or may not contain one or more of the names. I

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Hi James, See my previous reply. They aren't delimited by anything in particular. Thanks. will -Original Message- From: James Holmes [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 14:27 To: CF-Talk Subject: Re: Regex help looking for a name in a string. Are the names delimited

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Sure. But it still wouldn't work. :) -Original Message- From: Zaphod Beeblebrox [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 13:56 To: CF-Talk Subject: Re: Regex help looking for a name in a string. It does really look like your using Regex's. Since you're looking for strings

RE: Regex help looking for a name in a string.

2007-04-27 Thread Gaulin, Mark
be described and wil work, so that's something. Mark -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 8:47 AM To: CF-Talk Subject: RE: Regex help looking for a name in a string. Reorder by length so the longer names come first. Also

RE: Regex help looking for a name in a string.

2007-04-27 Thread Leitch, Oblio
Well, I've got a couple of comments, for what they're worth. First, you're not using RegEx. Next, it appears that what you're doing here: cfset works_string = qry_getEvent.works cfloop query=qry_getProfiles cfset works_string = REReplaceNoCase(#works_string#,

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Hi Bobby, Out of interest, how would I reorder by length? In the query? MySQL 4.1.7 Thanks Will -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 13:47 To: CF-Talk Subject: RE: Regex help looking for a name in a string. Reorder by length so

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
an alternative approach might be in order here... -Original Message- From: Leitch, Oblio [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 14:48 To: CF-Talk Subject: RE: Regex help looking for a name in a string. Well, I've got a couple of comments, for what they're worth. First, you're not using

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Yes, Do it in your query. Try this... Select artist From tablename Order by length(artist) -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 10:24 AM To: CF-Talk Subject: RE: Regex help looking for a name in a string. Hi Bobby, Out of interest

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
help looking for a name in a string. Yes, Do it in your query. Try this... Select artist From tablename Order by length(artist) -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 10:24 AM To: CF-Talk Subject: RE: Regex help looking for a name

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
thetext = replace(thetext, **#currentrow#**, a href='mypage.cfm?var=#artist#'#artist#/a, all) / /cfloop That did the trick for me. -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 3:34 PM To: CF-Talk Subject: RE: Regex help looking for a name

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Good plan. I reckon that will work. Now to play with the regex... Cheers w -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 20:34 To: CF-Talk Subject: RE: Regex help looking for a name in a string. I don't know what I was thinking but that wont

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
That's sweet Bobby - seems to work a treat. Thanks very much. Will -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 20:43 To: CF-Talk Subject: RE: Regex help looking for a name in a string. Or a couple loops !--- loop the query and replace

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Sorry, Should have said that you DO still have to: order by length(artist) desc -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 3:43 PM To: CF-Talk Subject: RE: Regex help looking for a name in a string. Or a couple loops !--- loop

RE: Regex help looking for a name in a string.

2007-04-27 Thread Will Swain
Thanks Bobby, I owe you a beer. And not just for this but for http://www.acoderslife.com/news/index.cfm?storyid=7 too!! Will -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: 27 April 2007 21:21 To: CF-Talk Subject: RE: Regex help looking for a name in a string

RE: Regex help looking for a name in a string.

2007-04-27 Thread Bobby Hartsfield
Haha! Beer may have played a part in that article... oh and I accept the beer. ;-) Cheers! -Original Message- From: Will Swain [mailto:[EMAIL PROTECTED] Sent: Friday, April 27, 2007 5:01 PM To: CF-Talk Subject: RE: Regex help looking for a name in a string. Thanks Bobby, I owe you

Re: RegEx help

2007-03-20 Thread Gareth Hughes
listFirst(/level-1/2nd-level/index.cfm,/) maybe? - Original Message - From: Mark Leder [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Tuesday, March 20, 2007 9:03 PM Subject: RegEx help I'm really not very good at this, so I'm grateful for any help. I've been using one

RE: RegEx help

2007-03-20 Thread Ben Nadel
cfset value = REReplace( /level-1/2nd-level/index.cfm /([^/]+)/.*, \1, ONE ) / This puts the first directory (level-1) into the first group reference. Then it replaces the entire string with that group reference. .. Ben Nadel Certified Advanced ColdFusion MX7 Developer

RE: RegEx help

2007-03-20 Thread Ben Nadel
:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 5:07 PM To: CF-Talk Subject: Re: RegEx help listFirst(/level-1/2nd-level/index.cfm,/) maybe? - Original Message - From: Mark Leder [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Tuesday, March 20, 2007 9:03 PM Subject: RegEx

RE: RegEx help

2007-03-20 Thread Mark Leder
Thanks to all, Gareth's solution works great. Though I want to study Ben's more (one first glance I got bug-eyed looking at it). Thanks, Mark ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIA’s for

RE: Regex Help

2007-02-13 Thread Steve LaBadie
Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 7:00 PM To: CF-Talk Subject: Re: Regex Help ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform

RE: Regex Help

2007-02-12 Thread Bobby Hartsfield
You will need to escape SOME of them. All of those will need to be escaped when literally trying to match them + * ? . [ ^ $ ( ) { | \ There is also a [:punct:] that matches all of these characters ! ' # S % ` ( ) * + , - . / : ; = ? @ [ / ] ^ _ { | } ~ Are you trying to match the EXACT

RE: Regex Help

2007-02-12 Thread Bobby Hartsfield
All of those will need to be escaped when literally trying to match them + * ? . [ ^ $ ( ) { | \ All of THESE not those :-) -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 10:08 AM To: CF-Talk Subject: RE: Regex Help You will need

RE: Regex Help

2007-02-12 Thread Steve LaBadie
Bobby, I get an invalid token | found error. To answer your question my match is predicated on one of these characters (@#$^_*) being present. ^(?=.*[A-Za-z])(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?!.*[^A-Za-z0-9@|#|\$|\ ^|_|\*])(?!.*s).{8,127}$

Re: Regex Help

2007-02-12 Thread Ben Doom
Since you say that it behaves differently in IE vs FF, does that mean that you are writing these in JavaScript? Are they being passed in a CFForm tag, or sent directly? Are you double-pounding (##) as necessary to escape the pound sign in a CFOUTPUT block? --Ben Doom Steve LaBadie wrote:

RE: Regex Help

2007-02-12 Thread Steve Brownlee
of the characters in the string should be non-alphanumeric. Hope that helps. Steve Brownlee http://www.fusioncube.net/ -Original Message- From: Steve LaBadie [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 10:39 AM To: CF-Talk Subject: RE: Regex Help Bobby, I get an invalid token | found

RE: Regex Help

2007-02-12 Thread Steve LaBadie
The only thing I am using JS for is to compare that the passwords match. I am using CFFORM CFINPUT. cfinput type=text name=pass maxlength=127 size=28 validate=regular_expression pattern=^(?=.*[A-Za-z])(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?!.*[^A-Za-z0- 9])(?!.*s).{8,127}$ class=formveld / cfinput

RE: Regex Help

2007-02-12 Thread Steve LaBadie
Steve, I still get an invalid token error Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 [EMAIL PROTECTED] http://www.esu.edu ~| Upgrade to Adobe ColdFusion MX7

RE: Regex Help

2007-02-12 Thread Steve Brownlee
Steve, As for the CFML construct not found message, I'm going out on a limb and guessing it's because you have the pound sign in the regular expression. Somehow that's messing up a matching set of pound signs for CFML parsing. Check your code around that statement and see where else you're using

RE: Regex Help

2007-02-12 Thread Steve LaBadie
: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 11:13 AM To: CF-Talk Subject: RE: Regex Help Steve, As for the CFML construct not found message, I'm going out on a limb and guessing it's because you have the pound sign in the regular expression. Somehow that's messing up

RE: Regex Help

2007-02-12 Thread Steve Brownlee
/ -Original Message- From: Steve LaBadie [mailto:[EMAIL PROTECTED] Sent: Monday, February 12, 2007 11:30 AM To: CF-Talk Subject: RE: Regex Help Steve, I doubled the # in the code and it worked in Firefox, but does not work in IE6 Why would that be? Steve LaBadie, Web Manager East Stroudsburg

RE: Regex Help

2007-02-12 Thread Steve LaBadie
I get an alert box that appears that says error in password text Steve LaBadie, Web Manager East Stroudsburg University 200 Prospect St. East Stroudsburg, Pa 18301 570-422-3999 [EMAIL PROTECTED] http://www.esu.edu ~| Upgrade

Re: Regex Help

2007-02-12 Thread Ben Doom
I'm pretty sure that IE6's JS engine does not correctly handle lookaheads. IIRC, rather than performing an actual lookahead, it goes ahead and eats the characters. Your best bet with this might be to check length with JS (cfform) and do the rest of the checking serverside. --Ben Doom Steve

RE: RegEx help

2006-11-28 Thread Steve Brownlee
You could try this... \b[(\d+|\w+)]{6,12}\b -Original Message- From: Chris Alvarado [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 9:08 AM To: CF-Talk Subject: RegEx help Hello all, Im a bit rusty with regular expressions and I know this is an easy one so im

RE: RegEx help

2006-11-28 Thread Steve Brownlee
Forget my attempt, Patrick's works perfectly. -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 2:29 PM To: CF-Talk Subject: RE: RegEx help You could try this... \b[(\d+|\w+)]{6,12}\b

RE: RegEx help

2006-11-28 Thread Bobby Hartsfield
Hartsfield http://acoderslife.com -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 2:47 PM To: CF-Talk Subject: RE: RegEx help Forget my attempt, Patrick's works perfectly. -Original Message- From: Steve Brownlee [mailto

RE: RegEx help

2006-11-28 Thread Steve Brownlee
: RE: RegEx help No it doesn't. Neither does yours. Patrick's was closer though. The only thing I could find that it failed on was an all numeric string 6 to 12 characters long. Yours failed for that as well as a string of all letters 6 to 12 characters long. Where's Ben Doom? lol

RE: RegEx help

2006-11-28 Thread Bobby Hartsfield
: RE: RegEx help What engine are you testing with? Patrick's pattern validates against all numeric, all alpha, and mixed against Perl 5, JDK 1.4 and JDK 1.5 implmenetations. -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 3:19 PM

Re: RegEx help

2006-11-28 Thread Patrick McElhaney
On 11/28/06, Steve Brownlee [EMAIL PROTECTED] wrote: What engine are you testing with? Patrick's pattern validates against all numeric, all alpha, and mixed against Perl 5, JDK 1.4 and JDK 1.5 implmenetations. He's saying all numeric isn't valid; there must be at least one letter. If you

RE: RegEx help

2006-11-28 Thread Bobby Hartsfield
: Patrick McElhaney [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 4:09 PM To: CF-Talk Subject: Re: RegEx help On 11/28/06, Steve Brownlee [EMAIL PROTECTED] wrote: What engine are you testing with? Patrick's pattern validates against all numeric, all alpha, and mixed against Perl 5, JDK

RE: RegEx help

2006-11-28 Thread Steve Brownlee
(as shown above). Steve Brownlee http://www.fusioncube.net -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 4:27 PM To: CF-Talk Subject: RE: RegEx help '1a11' fails 'a1aa' fails '1a' fails 'a1' fails

RE: RegEx help

2006-11-28 Thread Ben Nadel
MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Steve Brownlee [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 28, 2006 5:20 PM To: CF-Talk Subject: RE: RegEx help Sorry, can't get this outta my head now. Too interesting

RE: RegEx help

2006-11-28 Thread Bobby Hartsfield
] Sent: Tuesday, November 28, 2006 5:20 PM To: CF-Talk Subject: RE: RegEx help Sorry, can't get this outta my head now. Too interesting a challenge. I believe this one will do it. ^(?=.*[A-Za-z])(?=.*[0-9])(?!.*[^A-Za-z0-9])(?!.*\s).{6,12}$ LOL, as was said originally, easier to break

Re: RegEx help

2006-11-28 Thread Patrick McElhaney
On 11/28/06, Steve Brownlee [EMAIL PROTECTED] wrote: ^(?=.*[A-Za-z])(?=.*[0-9])(?!.*[^A-Za-z0-9])(?!.*\s).{6,12}$ Hmm... I don't think this part is necessary: (?!.*[^A-Za-z0-9])(?!.*\s) No one said anything about non-alphanumeric characters being disallowed, did they? If that's what

RE: RegEx help

2006-11-27 Thread Ben Nadel
I say break it up into two different test: cfif REFind( [\w]{6,12}, strText ) AND REFind( [0-9]+, strText ) /cfif It keeps it much more simple and easy to read than a bigger, more complex RegEx .. Ben Nadel Certified Advanced ColdFusion MX7

RE: RegEx help

2006-11-27 Thread Bobby Hartsfield
PROTECTED] Sent: Monday, November 27, 2006 9:32 AM To: CF-Talk Subject: RE: RegEx help I say break it up into two different test: cfif REFind( [\w]{6,12}, strText ) AND REFind( [0-9]+, strText ) /cfif It keeps it much more simple and easy to read than a bigger, more

RE: RegEx help

2006-11-27 Thread Bobby Hartsfield
But I guess that’s what Ben did heh... ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 9:32 AM To: CF-Talk Subject: RE: RegEx help I say break it up into two different

Re: RegEx help

2006-11-27 Thread Patrick McElhaney
]{6,12}, var) AND refind([0-9]+, var) / ..:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 9:32 AM To: CF-Talk Subject: RE: RegEx help I say break it up into two

RE: RegEx help

2006-11-27 Thread Bobby Hartsfield
Hartsfield http://acoderslife.com -Original Message- From: Patrick McElhaney [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 9:23 PM To: CF-Talk Subject: Re: RegEx help Can't resist the challenge. :-) ^(?=.*\d).{6,12}$ I'm not sure if this will actually work in CF

Re: REGEX help

2006-10-24 Thread Rob Wilkerson
On 10/23/06, Bobby Hartsfield [EMAIL PROTECTED] wrote: That's not anal OR picky. It won't work without it. I understand the technicalities, just as I'm sure Nathan does. I was making fun of both of us for making the same mistake - laziness and/or haste - in different ways.

RE: REGEX help

2006-10-24 Thread Bobby Hartsfield
I was too ;-) -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 24, 2006 8:04 AM To: CF-Talk Subject: Re: REGEX help On 10/23/06, Bobby Hartsfield [EMAIL PROTECTED] wrote: That's not anal OR picky. It won't work without it. I understand

Re: REGEX help

2006-10-24 Thread Rob Wilkerson
On 10/24/06, Bobby Hartsfield [EMAIL PROTECTED] wrote: I was too ;-) I hear you. Glad someone's keeping me on my toes. :-) ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion

Re: REGEX help

2006-10-24 Thread Jake Churchill
Thank you for the help. I knew about the parentheses but forgot about the \1 Rob Wilkerson wrote: On 10/24/06, Bobby Hartsfield [EMAIL PROTECTED] wrote: I was too ;-) I hear you. Glad someone's keeping me on my toes. :-)

RE: REGEX help

2006-10-24 Thread Andy Matthews
You could do it really simple and search for the word followed by a space, comma, period or dash. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message-

Re: REGEX help

2006-10-24 Thread Jake Churchill
What I ended up doing is allowing highlighting to be turned on and off. The client seems to like it so far but if they complain in the future, I'll implement the regex. I did a simple search like that but it requires more code because you have to keep track of what character surrounds the

Re: REGEX help

2006-10-23 Thread Rob Wilkerson
Try \barchitect\b. Of course, replace architect with the keyword that was entered. the \b marks word boundaries. Rob Wilkerson On Oct 23, 2006, at 6:44 PM, Jake Churchill wrote: I'm not really good with regexes so I need some help here. I have a simple search page which searches a

Re: REGEX help

2006-10-23 Thread Nathan Strutz
If you're trying to highlight the word architect, using rob's regex, you would do something like this: reReplaceNoCase(stringVar, \barchitect\b, html to highlight\1/html to highlight, ALL) Wrap it in #'s or set it to a variable. the \1 is a back reference to your regex search, so in this case

Re: REGEX help

2006-10-23 Thread Rob Wilkerson
Okay, this is going to get pretty anal, so children should avert their eyes... In order to use the backreference Nathan is describing, you'd need to wrap the keyword in parentheses: REReplaceNoCase(stringVar, \b(architect)\b, html to highlight\1/ html to highlight, ALL) :-D Told you that

RE: REGEX help

2006-10-23 Thread Bobby Hartsfield
That’s not anal OR picky. It won't work without it. -Original Message- From: Rob Wilkerson [mailto:[EMAIL PROTECTED] Sent: Monday, October 23, 2006 9:00 PM To: CF-Talk Subject: Re: REGEX help Okay, this is going to get pretty anal, so children should avert their eyes... In order

Re: regex help

2006-08-29 Thread Dan Plesse
Just get the word or words and leave the rest alone. Never remove things you don't need if you can get at the good stuff. Like would you remove the bank to get the money :) I made a funny. ~| Introducing the Fusion Authority

RE: regex help

2006-08-28 Thread Ben Nadel
Try this: #REReplaceNoCase( a href=this,that and the otherword/a, (a[^]*)((?!/a).)*?(/a[^]*), \2, ALL )# That uses a negative look ahead... I can't remember if that is supported in CF directly or not. If it is not, try this: #REReplaceNoCase( a

Re: regex help

2006-08-28 Thread Steve Bryant
Doug, Do you want to strip out all HTML, or just a tags? What about words that appear otside of the link? For example: another a href=this,that and the otherword/a problem Should that become: another word problem or: word If you want to strip out all html, and leave words outside the tag,

Re: regex help

2006-08-28 Thread Doug Brown
, August 28, 2006 6:31 AM Subject: Re: regex help Doug, Do you want to strip out all HTML, or just a tags? What about words that appear otside of the link? For example: another a href=this,that and the otherword/a problem Should that become: another word problem or: word If you want

Re: regex help

2006-08-28 Thread Michael Dinowitz
ColdFusion MX supports positive and negative look aheads. Try this: #REReplaceNoCase( a href=this,that and the otherword/a, (a[^]*)((?!/a).)*?(/a[^]*), \2, ALL )# That uses a negative look ahead... I can't remember if that is supported in CF directly or not. If it is

RE: regex help

2006-08-28 Thread Ben Nadel
PROTECTED] Sent: Monday, August 28, 2006 9:19 AM To: CF-Talk Subject: Re: regex help ColdFusion MX supports positive and negative look aheads. Try this: #REReplaceNoCase( a href=this,that and the otherword/a, (a[^]*)((?!/a).)*?(/a[^]*), \2, ALL )# That uses a negative look

Re: regex help

2006-08-28 Thread Steve Bryant
Doug, This function will return an array of the link labels (the text between each a tag) in a string. cfscript function getLinkLabels(string) { var result = ArrayNew(1); var anchors = ReFindNoCase(a[^]*[^(/a)]*/a,string,1,true); var i = 0; var tag = ;

RE: regex help

2006-08-28 Thread Dan G. Switzer, II
Doug, Was wondering how I would strip out everything between a href=this,that and the otherword/a and just leave the word? Rahul Narula, who works for Adobe on the web team, just posted this recently: http://rahulnarula.blogspot.com/2006/08/regex-treat.html (Watch out for line wrapping in

Re: Regex Help...

2006-08-07 Thread Mingo Hagen
I'd say: reReplace( string, '[A-Z##*/-]+', '', 'all' ) not sure if you need to escape the *, though. Mingo. Rick Root wrote: I need to remove all characters from a string that are *NOT* the following: A-Z # * / - currently, my regex looks like this:

Re: Regex Help...

2006-08-07 Thread Charlie Griefer
rereplace(lastName, [^[:alpha:]#*/-], , all) not sure if any of those are special characters what'd need to be escaped or not... On 8/7/06, Rick Root [EMAIL PROTECTED] wrote: I need to remove all characters from a string that are *NOT* the following: A-Z # * / - currently, my regex

RE: Regex Help...

2006-08-07 Thread Andy Matthews
Why not just put everything you DO want in the string and invert it. ^[A-Z#*/-] !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: Rick Root

Re: Regex Help...

2006-08-07 Thread Eric Haskins
I just wrote this for a perl Cross-Site Scripting quick fix. Im unsure how to move it to CF as I am still learning $uri =~ s/[^A-Za-z0-9\/]*//g; after the 0-9 is actually a backslash escaping a forwardslash That cleans everything accept Alpha Numeric and / in $uri variable -- ~Eric

Re: Regex Help...

2006-08-07 Thread Eric Haskins
cfset string=me_here\you too/ / cfset pattern=[^A-Za-z0-9\/]/ cfoutput#reReplace( string, pattern, '', 'all' )#/cfoutput Results in : mehereyoutoo/ Dont know if it helps but ~Eric On 8/7/06, Eric Haskins [EMAIL PROTECTED] wrote: I just wrote this for a perl Cross-Site Scripting quick fix. Im

Re: Regex help for email validation

2006-03-13 Thread Ben Doom
You'll want to replace all instances of \w left of the @ with something like [a-zA-Z0-9_-] (which is off the top of my head and may need tweaking). --Ben Rey Bango wrote: Guys I have the following javascript code that validates email addresses. The problem is that it won't accept an email

RE: Regex help for email validation

2006-03-13 Thread Munson, Jacob
I agree with his suggestion, but since the code is doing a case insensitive match, you don't need the 'A-Z'. But I'm nitpicking. ;) -Original Message- From: Ben Doom Sent: Monday, March 13, 2006 9:47 AM You'll want to replace all instances of \w left of the @ with something

Re: Regex help for email validation

2006-03-13 Thread Rey Bango
LOL. Thanks guys. FF's JS console is throwing an error though: Error: missing ] after element list Source File: https://www.healthybuyersclub.com/scripts/emailcheck.js Line: 18, Column: 21 Source Code: var filter=[a-zA-Z0-9_-]@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i It looks

Re: Regex help for email validation

2006-03-13 Thread Ben Doom
Move the dash to the beginning of the [] block. If that doesn't work escape it with a \ (\-). --Ben Rey Bango wrote: LOL. Thanks guys. FF's JS console is throwing an error though: Error: missing ] after element list Source File: https://www.healthybuyersclub.com/scripts/emailcheck.js

RE: Regex help for email validation

2006-03-13 Thread Munson, Jacob
To: CF-Talk Subject: Re: Regex help for email validation LOL. Thanks guys. FF's JS console is throwing an error though: Error: missing ] after element list Source File: https://www.healthybuyersclub.com/scripts/emailcheck.js Line: 18, Column: 21 Source Code: var filter=[a-zA-Z0-9_-]@((?:\w

Re: Regex help for email validation

2006-03-13 Thread Rey Bango
-Original Message- From: Rey Bango [mailto:[EMAIL PROTECTED] Sent: Monday, March 13, 2006 10:05 AM To: CF-Talk Subject: Re: Regex help for email validation LOL. Thanks guys. FF's JS console is throwing an error though: Error: missing ] after element list Source File: https

Re: Regex help for email validation

2006-03-13 Thread Jochem van Dieten
Munson, Jacob wrote: It looks like you may have deleted too much. Here's what I've got that works (in FF): /^([a-z0-9_-]+(?:\.[a-z0-9_-]+)*)@((?:\w+\.)*\w[\w-]{0,66})\.([a-z]{2,6} (?:\.[a-z]{2})?)$/i That is just moving the problem from a - to the next character. [EMAIL PROTECTED] will not

Re: regex help

2006-02-05 Thread Claude Schneegans
didnt Mike have a cfm regex builer at one time?? Don't know about Mike, but you can try REwizard here : http://www.contentbox.com/claude/REwizard/index.cfm -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm

RE: regex help

2006-02-04 Thread Bobby Hartsfield
rereplace(replace(body, postmaster, , all), .+(.*?).+, \1, all) ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: dave [mailto:[EMAIL PROTECTED] Sent: Saturday, February 04, 2006 11:47 PM To: CF-Talk Subject: regex help didnt Mike have a cfm

RE: Regex Help Needed

2005-12-07 Thread Ben Nadel
You could just do something a bit more simple: strTarget = SatSun; strResult = (Left(strTarget, 3) , Right(strTarget, 3)); ... 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

Re: Regex Help Needed

2005-12-07 Thread Jim McAtee
@houseoffusion.com Sent: Wednesday, December 07, 2005 11:56 AM Subject: RE: Regex Help Needed You could just do something a bit more simple: strTarget = SatSun; strResult = (Left(strTarget, 3) , Right(strTarget, 3)); ... Ben Nadel Web Developer Nylon Technology 6 West 14th

Re: regex help :(

2005-11-29 Thread Ben Doom
If you are using CFMX, you can (probably) use p.*?/p If you are using 5 or older, it's going to be a lot tougher. Let us know if that doesn't work. --Ben John Beynon wrote: I'm trying to split up html paragraph p/pp/p tags into items in an array with their contents in between the p's, I found

Re: regex help :(

2005-11-29 Thread John Beynon
yeah, I tried that one, I'm using this as my string: pPara1/ppPara2/ppPara3/p and i get; array 1 [empty string] 2 pPara2/p when i dump the results - using ReSplit(mystring,'p.*?/p') On 11/29/05, Ben Doom [EMAIL PROTECTED] wrote: If you are using CFMX, you can (probably) use

Re: regex help :(

2005-11-29 Thread Ben Doom
Ah, I just looked at resplit. It's actually returning correct results. The regex works like a delimiter in a list -- it's what's between the array results, not what they should be. You might try this as a regex for resplit: /?p+ You could also use refind() and loop over the results using

Re: regex help :(

2005-11-29 Thread Claude Schneegans
I'm trying to split up html paragraph p/pp/p tags into items in an array You should have a look at CF_REextract, it will return all you need in a query, or a list, then easily transferable to an array. http://www.cftagstore.com/tags/cfreextract.cfm -- ___

Re: regex help :(

2005-11-29 Thread John Beynon
i have it already ;) will look into using that. thanks john. On 11/29/05, Claude Schneegans [EMAIL PROTECTED] wrote: I'm trying to split up html paragraph p/pp/p tags into items in an array You should have a look at CF_REextract, it will return all you need in a query, or a list, then

Re: regex help :(

2005-11-29 Thread Claude Schneegans
i have it already Then you should not even post the question! :-D -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks.

<    1   2   3   4   5   >