RE: RegEx - help

2005-04-14 Thread Pascal Peters
: RegEx - help Anyone got a RegEx to strip out certain HTML tags (and content between them). I have a working StripHTML UDF now but I require one which can say remove this in its entirety: select name=foo option value=pingpong/option /select Any RegEx gurus out there switched on today

RE: RegEx - help

2005-04-14 Thread David Manriquez
select[^]+ [^] anything not like David Manriquez Desarrollador [EMAIL PROTECTED] (+56-2) 43 00 155 -Mensaje original- De: Pascal Peters [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 14 de Abril de 2005 7:11 Para: CF-Talk Asunto: RE: RegEx - help REReplaceNoCase

RE: Regex help

2005-04-13 Thread Pascal Peters
Replace the Mid() by RemoveChars(qs, stuff.pos[1], stuff.len[1]) And it should work Pascal -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: 13 April 2005 03:01 To: CF-Talk Subject: Regex help (CF5 on IIS, Win2k Server) I have a CF template set up

RE: Regex help

2005-04-13 Thread Ewok
INFO4: file.cfm !--- END OUTPUT --- -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 9:01 PM To: CF-Talk Subject: Regex help (CF5 on IIS, Win2k Server) I have a CF template set up as the IIS 404 error handler on a web site. When IIS detects

RE: Regex help

2005-04-13 Thread Ewok
Wow ... that didn’t come in like I typed it.. sorry it was all jumbled -Original Message- From: Ewok [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 9:49 AM To: CF-Talk Subject: RE: Regex help cfset urltext = http://somesite.com/dir/file.cfm?var=value; / cfset info1 = listrest

Regex help

2005-04-12 Thread Jim McAtee
(CF5 on IIS, Win2k Server) I have a CF template set up as the IIS 404 error handler on a web site. When IIS detects a 404 error it calls the CF page and passes the original request within the CGI variable cgi.query_string in the following form: 404;http://www.mydomain.com/missingpage.htm or

RE: Regex help

2005-04-12 Thread Taco Fleur
Senior Web Systems Engineer http://www.webassociates.com -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: Wednesday, 13 April 2005 11:01 AM To: CF-Talk Subject: Regex help (CF5 on IIS, Win2k Server) I have a CF template set up as the IIS 404 error handler on a web site

RE: Regex help

2005-04-12 Thread Taco Fleur
Engineer http://www.webassociates.com -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: Wednesday, 13 April 2005 11:01 AM To: CF-Talk Subject: Regex help (CF5 on IIS, Win2k Server) I have a CF template set up as the IIS 404 error handler on a web site. When IIS

RE: regex help for grabbing values of html tag attributes

2005-03-23 Thread Pascal Peters
PROTECTED] Sent: 22 March 2005 22:59 To: CF-Talk Subject: RE: regex help for grabbing values of html tag attributes Ben, I can see what you've got (I think) and it makes sense, but for some reason, it's not working. I'm grabbing the html from www.google.com and running

RE: regex help for grabbing values of html tag attributes

2005-03-23 Thread Pascal Peters
PROTECTED] Sent: 22 March 2005 22:59 To: CF-Talk Subject: RE: regex help for grabbing values of html tag attributes Ben, I can see what you've got (I think) and it makes sense, but for some reason, it's not working. I'm grabbing the html from www.google.com and running

regex help for grabbing values of html tag attributes

2005-03-22 Thread Burns, John D
Does anyone have a regex already written (or would any of you regex gurus like you put something up) that could take the source code of an HTML file and grab the value of an attribute given the tag and the attribute that would be grabbed. For instance, if I wanted to get the value of any classes

Re: regex help for grabbing values of html tag attributes

2005-03-22 Thread Ben Doom
What version of CF? --Ben Burns, John D wrote: Does anyone have a regex already written (or would any of you regex gurus like you put something up) that could take the source code of an HTML file and grab the value of an attribute given the tag and the attribute that would be grabbed. For

RE: regex help for grabbing values of html tag attributes

2005-03-22 Thread Burns, John D
Wyle Laboratories, Inc. | Web Developer -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 22, 2005 4:14 PM To: CF-Talk Subject: Re: regex help for grabbing values of html tag attributes What version of CF? --Ben Burns, John D wrote: Does anyone have

Re: regex help for grabbing values of html tag attributes

2005-03-22 Thread Ben Doom
Well, I see a couple of problems with what you're using. First, you've not got a closing on the attribute. Second, you've wrapped a regex that contains a in 's, which will error out if you don't escape the inner 's. You can wrap it with single quotes to fix that. Also, the last * boggles

RE: regex help for grabbing values of html tag attributes

2005-03-22 Thread Burns, John D
PM To: CF-Talk Subject: Re: regex help for grabbing values of html tag attributes Well, I see a couple of problems with what you're using. First, you've not got a closing on the attribute. Second, you've wrapped a regex that contains a in 's, which will error out if you don't escape the inner

Re: regex help for grabbing values of html tag attributes

2005-03-22 Thread Ben Doom
Try refindnocase('img.*?src=(.*?).*?',cfhttp.fileContent,1,'true') I think the 0 and the non-quoted true are confusing it. Just a guess, though. Also, have you verified the contents of cfhttp.filecontent? --Ben Burns, John D wrote: Ben, I can see what you've got (I think) and it makes

Re: regex help for grabbing values of html tag attributes

2005-03-22 Thread Claude Schneegans
What you're trying to do is far from being trivial, however, I'm pretty sure that CF_REextract should help you a lot. See the link below. -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to

Re: RegEx help

2005-02-21 Thread Pete Jordan
Cedric Villat wrote: I want to remove all periods ( . ) that do not appear between 2 numbers. For instance, I would want to keep this period: 5.5 But not these: www.domain.com I want the periods to be replaces with a space in the second example. Anyone? I don't think there's any

RE: RegEx help

2005-02-21 Thread Adrian Lynch
What about 10.24? Would that have the full stop(period) removed? Ade -Original Message- From: Cedric Villat [mailto:[EMAIL PROTECTED] Sent: 21 February 2005 01:15 To: CF-Talk Subject: RegEx help I'm trying to create a regex that does the following, with little luck so far. I want

Re: RegEx help

2005-02-21 Thread Cedric Villat
the immediate characters around the period are not important. Thanks, Cedric What about 10.24? Would that have the full stop(period) removed? Ade -Original Message- From: Cedric Villat [mailto:[EMAIL PROTECTED] Sent: 21 February 2005 01:15 To: CF-Talk Subject: RegEx help I'm trying

Re: RegEx help

2005-02-21 Thread Cedric Villat
Pete, Thanks, that was the way I thought I would have to go. Just was hoping there was an easier way :) I'd still like to see if it can be done in 1 *line* :) Thanks. Cedric Cedric Villat wrote: I don't think there's any sane way to do this with a single POSIX regexp (I think I could do it

Re: RegEx help

2005-02-21 Thread Ben Doom
Assuming CFMX: rereplace(text,(?(.)\.([^0-9]))|(?([^0-9])\.(.)), \1\2, all); Not tested, YMMV, there are a lot of parens and it wouldn't surprise me if I'm off somewhere, etc. But the basic idea is to check for either a non-number before or after the dot. --Ben Cedric Villat wrote: Pete,

Re: RegEx help

2005-02-21 Thread Cedric Villat
Ben, That makes sense. I get an error though, as it complains about the ?. What are they for? I thought the ? was the 0 or 1 occurances operator. Also, would this cover things like: 12.2.12.12 ? I noticed that my current regex of m = REReplace(m, ([0-9])\.([0-9]), \1|\2, ALL); generate

Re: RegEx help

2005-02-21 Thread Ben Doom
The question marks in this instance are instructions to not create a backreference for that set of parens. You can drop them, but you might have to adjust which backreferences you use in the replace param. Now that you mention it, you're right: this will fail on www.a.com but not www.aa.com

Re: RegEx help - Solved

2005-02-21 Thread Cedric Villat
Ben, I got it working with: REReplace(text, ((.)\.([^0-9]))|([^0-9]\.(.)), \2 \3, all); Cedric Ben, That makes sense. I get an error though, as it complains about the ?. What are they for? I thought the ? was the 0 or 1 occurances operator. Also, would this cover things like:

Re: RegEx help

2005-02-21 Thread Pete Jordan
Cedric Villat wrote: I get an error though, as it complains about the ?. What are they for? It's a (mistyped :) Perl extension that POSIX (and CF) don't support: '?:' after the '(' stops the parenthesised section being treated as a referenceable subexpression: it's just used for grouping.

Re: RegEx help

2005-02-21 Thread Ben Doom
It's a (mistyped :) Perl extension that POSIX (and CF) don't support: '?:' after the '(' stops the parenthesised section being treated as a referenceable subexpression: it's just used for grouping. Oops. It was mistyped! That's what I get for Copy'N'Pasting. Also, for trying to answer

Re: RegEx help

2005-02-21 Thread Pete Jordan
Ben Doom wrote: Oops. It was mistyped! That's what I get for Copy'N'Pasting. Also, for trying to answer questions on a Monday. However, it is supported in CFMX, which no longer uses a POSIX engine. Non-greedy or lazy matching is supported in CFMX. IIRC, lookahead is as well, but

Re: RegEx help

2005-02-21 Thread Ben Doom
For a variety of reasons, we skipped CF6MX and are only now working through migration issues for CF7MX: I hadn't picked up on the extended regexp facilities, only that the new engine seems to be some three times faster than CF5. Still far too slow, but any improvement is welcome. Yeah,

RegEx help

2005-02-20 Thread Cedric Villat
I'm trying to create a regex that does the following, with little luck so far. I want to remove all periods ( . ) that do not appear between 2 numbers. For instance, I would want to keep this period: 5.5 But not these: www.domain.com I want the periods to be replaces with a space in the

RE: regex help (Almost)

2005-01-16 Thread Ewok
The regex works for most cases... but it's not stopping at the next ending tag... For example, the quote replac regex... I have [quote]heres a quote[/quote] Here's some text [quote]here's another quote[/quote] The expression replaces quote tags with blockquote tags unless it false between

RE: regex help (Almost)

2005-01-16 Thread Matthew Walker
: RE: regex help (Almost) The regex works for most cases... but it's not stopping at the next ending tag... For example, the quote replac regex... I have [quote]heres a quote[/quote] Here's some text [quote]here's another quote[/quote] The expression replaces quote tags with blockquote tags

RE: regex help (Almost)

2005-01-16 Thread Mike Nicholls
\2/blockquote, ALL) -Original Message- From: Ewok [mailto:[EMAIL PROTECTED] Sent: Monday, 17 January 2005 10:01 a.m. To: CF-Talk Subject: RE: regex help (Almost) The regex works for most cases... but it's not stopping at the next ending tag... For example, the quote replac regex... I

RE: regex help (Almost)

2005-01-16 Thread Ewok
MAN! How simple was that! Uhgg thanks guys -Original Message- From: Mike Nicholls [mailto:[EMAIL PROTECTED] Sent: Sunday, January 16, 2005 4:11 PM To: CF-Talk Subject: RE: regex help (Almost) Regular expressions are greedy by default, they match as much as they can. Adding

RE: regex help (Almost)

2005-01-16 Thread Ewok
Incase you haven’t realized regex's aren’t my forte! This seems to be the last little kink to get out of this thing and it will be set (or I'm going back to the original Jim Davis loop!) str = rereplace(str, (\[hr\])(?!(?!\[code\]).*?\[/code\]), hr, ALL); this regex works perfectly as long

Re: regex help (Almost)

2005-01-16 Thread Jared Rypka-Hauer - CMG, LLC
Still fighting that thing, eh? I spent 3 hours this afternoon trying to figure out why a simple INSERT query wouldn't work... finally I wrapped the query text in ## and a cfoutput, then copy/pasted it into Query Analyzer... only to find out that the problem was a new column in the database that

RE: regex help (Almost)

2005-01-16 Thread Ewok
:[EMAIL PROTECTED] Sent: Sunday, January 16, 2005 8:24 PM To: CF-Talk Subject: Re: regex help (Almost) Still fighting that thing, eh? I spent 3 hours this afternoon trying to figure out why a simple INSERT query wouldn't work... finally I wrapped the query text in ## and a cfoutput, then copy/pasted

Re: regex help (Almost)

2005-01-16 Thread Jared Rypka-Hauer - CMG, LLC
Geeze, I sure hope anyone who read this paragraph: Still fighting that thing, eh? I spent 3 hours this afternoon trying to figure out why a simple INSERT query wouldn't work... finally I wrapped the query text in ## and a cfoutput, then copy/pasted it into Query Analyzer... only to find out that

RE: regex help (Almost)

2005-01-16 Thread Ewok
16, 2005 10:45 PM To: CF-Talk Subject: Re: regex help (Almost) Geeze, I sure hope anyone who read this paragraph: Still fighting that thing, eh? I spent 3 hours this afternoon trying to figure out why a simple INSERT query wouldn't work... finally I wrapped the query text in ## and a cfoutput

Re: regex help (Almost)

2005-01-16 Thread Jared Rypka-Hauer - CMG, LLC
:P I just read the note I sent and thought Good god, that sucked. Figured if I thought it, someone else probably did too. But then, we're all our own worse critics... And I only got 2 cups of coffee today... every time I went to fill my cup, the pot was empty. Hey, maybe that's the problem...

regex help

2005-01-15 Thread Ewok
This is a tough one... It's an old bbml parser I wrote a while back and im trying to modify it a little. I want to search through the string and replace all instances of [b] with b UNLESS it falls between [pre] and [/pre] I just can't seem to get it right. Replace [b] with b except when it

RE: regex help

2005-01-15 Thread Jim Davis
-Original Message- From: Ewok [mailto:[EMAIL PROTECTED] Sent: Saturday, January 15, 2005 4:05 AM To: CF-Talk Subject: regex help This is a tough one... It's an old bbml parser I wrote a while back and im trying to modify it a little. I want to search through the string

Re: regex help

2005-01-15 Thread Jared Rypka-Hauer - CMG, LLC
H... lets see... You'd want to use a few UDFs, and a struct or two... first UDF would be findAllCodeTags, and would call findCodeTag, which would find a code tag and return the pos, and len, arrays, which findAllCodeTags would store in an array. Then, you'd want a findAllBTags and findBTag,

RE: regex help

2005-01-15 Thread Ewok
15, 2005 1:00 PM To: CF-Talk Subject: RE: regex help -Original Message- From: Ewok [mailto:[EMAIL PROTECTED] Sent: Saturday, January 15, 2005 4:05 AM To: CF-Talk Subject: regex help This is a tough one... It's an old bbml parser I wrote a while back and im trying to modify

RE: regex help

2005-01-15 Thread Ewok
. Thanks for the brain jump start. -Original Message- From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] Sent: Saturday, January 15, 2005 1:33 PM To: CF-Talk Subject: Re: regex help H... lets see... You'd want to use a few UDFs, and a struct or two... first UDF would

Re: regex help

2005-01-15 Thread Jared Rypka-Hauer - CMG, LLC
, January 15, 2005 1:33 PM To: CF-Talk Subject: Re: regex help H... lets see... You'd want to use a few UDFs, and a struct or two... first UDF would be findAllCodeTags, and would call findCodeTag, which would find a code tag and return the pos, and len, arrays, which findAllCodeTags

RE: regex help

2005-01-15 Thread Ewok
Great... I'll take a look, thanks. Ha storage ROOM... we have a storage BARN can you say museum? -Original Message- From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] Sent: Saturday, January 15, 2005 3:11 PM To: CF-Talk Subject: Re: regex help O Duh... I think

RE: regex help

2005-01-15 Thread Jim Davis
-Original Message- From: Ewok [mailto:[EMAIL PROTECTED] Sent: Saturday, January 15, 2005 2:24 PM To: CF-Talk Subject: RE: regex help Thanks! I'll go take a look. On another note... I seem to remember a colorcode tag that would color code for you. I can't say rather or not it had

RE: regex help

2005-01-15 Thread Ewok
Wow that was a pain... Thanks Jim. I was able to use portions of your code (very little change) to get it done... //Code from Jim Davis' DP_ParseBBML CodeBlocks = ArrayNew(1); CurPos=1; while (FindNoCase([code], str, CurPos) GT 0) { sCodePos = FindNoCase([code], str, CurPos) + 6;

RE: regex help

2005-01-15 Thread Jim Davis
-Original Message- From: Ewok [mailto:[EMAIL PROTECTED] Sent: Saturday, January 15, 2005 7:33 PM To: CF-Talk Subject: RE: regex help Wow that was a pain... Thanks Jim. I was able to use portions of your code (very little change) to get it done... any objections to me

Re: regex help

2005-01-15 Thread Umer Farooq
The following regex should do the trick.. cfset changed = rereplace(temp, (\[b\]([Aa-zZ0-9\s]*)\[\/b\])(?!((?!pre).)*?\/pre), b\2/b, ALL) note the backrefrence \2 is to ([Aa-zZ0-9\s]*).. do not use the dot notation in there. -- Regards Ewok wrote: This is a tough one... It's an old bbml

Re: regex help

2005-01-15 Thread Umer Farooq
Err.. the pre points to pre it should be [pre].. fixed one below.. (\[b\]([Aa-zZ0-9\s]*)\[/b\])(?!((?!\[pre\]).)*?\[/pre\]) Umer Farooq wrote: The following regex should do the trick.. cfset changed = rereplace(temp, (\[b\]([Aa-zZ0-9\s]*)\[\/b\])(?!((?!pre).)*?\/pre), b\2/b, ALL) note

RE: regex help

2005-01-15 Thread Ewok
: Saturday, January 15, 2005 9:41 PM To: CF-Talk Subject: Re: regex help Err.. the pre points to pre it should be [pre].. fixed one below.. (\[b\]([Aa-zZ0-9\s]*)\[/b\])(?!((?!\[pre\]).)*?\[/pre\]) Umer Farooq wrote: The following regex should do the trick.. cfset changed = rereplace(temp

Re: regex help

2005-01-15 Thread Umer Farooq
and use your original as long as it doesn’t give me a fit on tags without closing tags smileys, [hr] etc... Thanks again. Nice job! -Original Message- From: Umer Farooq [mailto:[EMAIL PROTECTED] Sent: Saturday, January 15, 2005 9:41 PM To: CF-Talk Subject: Re: regex help Err

RE: regex help

2005-01-15 Thread Ewok
: Umer Farooq [mailto:[EMAIL PROTECTED] Sent: Saturday, January 15, 2005 11:55 PM To: CF-Talk Subject: Re: regex help NP.. ya.. it should work out just fine.. as you already have the single tag replace code below.. and original will make things faster.. if you gota do it over lot of code

RE: Regex Help.

2005-01-11 Thread Pascal Peters
, STEVEN J (AIT) [mailto:[EMAIL PROTECTED] Sent: 10 January 2005 20:43 To: CF-Talk Subject: Regex Help. Hi All, Need some help with a regex. What I'm trying to do is validate and input in javascript. The users are allowed to input a number. It can be in the following formats: 9 9.9

Regex Help.

2005-01-10 Thread DURETTE, STEVEN J \(AIT\)
Hi All, Need some help with a regex. What I'm trying to do is validate and input in javascript. The users are allowed to input a number. It can be in the following formats: 9 9.9 9.99 .99 .9 (9 used inplace of any digit.) I tried using \b[0-9.]+ and I've tried \b[\d]*([.]?[\d]{0,2})?

Re: Regex Help.

2005-01-10 Thread Tony Hicks
Can you use isNaN here? Just use it on your number to verify that it is or is not a number... what's your code look like? On Mon, 10 Jan 2005 14:43:27 -0500, DURETTE, STEVEN J (AIT) [EMAIL PROTECTED] wrote: Hi All, Need some help with a regex. What I'm trying to do is validate and input

Re: Regex Help.

2005-01-10 Thread Greg Morphis
I think this will work.. ^\d{1,2}.\d{1,2}$ (not tested) On Mon, 10 Jan 2005 14:43:27 -0500, DURETTE, STEVEN J (AIT) [EMAIL PROTECTED] wrote: Hi All, Need some help with a regex. What I'm trying to do is validate and input in javascript. The users are allowed to input a number. It

Re: Regex Help.

2005-01-10 Thread Greg Morphis
^[\d]*([.]?[\d]{1,2})?$ there that will catch 9, 9.9, 9.99, will not catch 9. 9.9.9, etc On Mon, 10 Jan 2005 13:51:23 -0600, Greg Morphis [EMAIL PROTECTED] wrote: I think this will work.. ^\d{1,2}.\d{1,2}$ (not tested) On Mon, 10 Jan 2005 14:43:27 -0500, DURETTE, STEVEN J (AIT)

RE: Regex Help.

2005-01-10 Thread DURETTE, STEVEN J \(AIT\)
Thanks, That did it. -Original Message- From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 2:57 PM To: CF-Talk Subject: Re: Regex Help. ^[\d]*([.]?[\d]{1,2})?$ there that will catch 9, 9.9, 9.99, will not catch 9. 9.9.9, etc On Mon, 10 Jan 2005 13:51:23

RE: Regex Help.

2005-01-10 Thread DURETTE, STEVEN J \(AIT\)
Opps, That didn't work after all. User puts in D and it evaluates to true with that reg ex. Steve -Original Message- From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 2:57 PM To: CF-Talk Subject: Re: Regex Help. ^[\d]*([.]?[\d]{1,2

Re: Regex Help.

2005-01-10 Thread Greg Morphis
and it evaluates to true with that reg ex. Steve -Original Message- From: Greg Morphis [mailto:[EMAIL PROTECTED] Sent: Monday, January 10, 2005 2:57 PM To: CF-Talk Subject: Re: Regex Help. ^[\d]*([.]?[\d]{1,2})?$ there that will catch 9, 9.9, 9.99, will not catch 9. 9.9.9, etc

SOT: RegEx help

2005-01-03 Thread Todd
I would post this to the RegEx list, but I'm short on time and the HoF web site is giving me fits when I try to subscribe. :) I just got a major problem dumped in my lap. We have about 1/2 a gig of pure HTML files that are screwed up and the boss wants them fixed yesterday. I'm writing a CF

Re: SOT: RegEx help

2005-01-03 Thread Ben Doom
Well, it seems to me that there should be a space after every comma, anyway, so couldn't you just do a simple replace() to replace commas with a comma and a space? --Ben Todd wrote: I would post this to the RegEx list, but I'm short on time and the HoF web site is giving me fits when I try

Re: SOT: RegEx help

2005-01-03 Thread Todd
Subject: Re: SOT: RegEx help Well, it seems to me that there should be a space after every comma, anyway, so couldn't you just do a simple replace() to replace commas with a comma and a space? --Ben ~| Special thanks to the CF

Re: SOT: RegEx help

2005-01-03 Thread Ben Doom
and everywhere else would cause any confusion. - Original Message - From: Ben Doom [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Monday, January 03, 2005 9:36 AM Subject: Re: SOT: RegEx help Well, it seems to me that there should be a space after every comma, anyway

Re: Regex help CF REGEX Guru's please.

2004-12-04 Thread Joe Rinehart
Hey Ian, Think it may be your pound signsturn d!#$ into d!##$ and see what happens. Cheers, Joe On Fri, 3 Dec 2004 14:36:29 -0800, Ian Skinner [EMAIL PROTECTED] wrote: I am getting a ColdFusion error trying to use my favorite RegEx E-mail validation. I have always used this

Regex help CF REGEX Guru's please.

2004-12-03 Thread Ian Skinner
I am getting a ColdFusion error trying to use my favorite RegEx E-mail validation. I have always used this expression client side in JS, I am not trying to use this in ColdFusion for the first time. I assume I am running into the problem of ColdFusion's limited RegEx support, but I am not

RegEx help

2004-10-21 Thread Burns, John D
I'm trying to parse through some information in a text document where there is information like this: Text text text text text text text FirstName: Bob Age: 30 text text text text text text text text LastName: Brown text text text text text but this information is also within a bunch of other

Re: RegEx help

2004-10-21 Thread Jerry Johnson
What version of Cold Fusion? How long is the longest possible string you are searching through? If newer than cf 5, or cf 5 and the max string is less than 20KB, cfset fieldName=FirstName cfset fieldVal=rereplace(content,.*#fieldName#: +([^ ]+) +.*,\1) (I think) Jerry Johnson [EMAIL

RE: RegEx help

2004-10-21 Thread Burns, John D
[mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 12:41 PM To: CF-Talk Subject: Re: RegEx help What version of Cold Fusion? How long is the longest possible string you are searching through? If newer than cf 5, or cf 5 and the max string is less than 20KB, cfset fieldName=FirstName cfset

Re: RegEx help

2004-10-21 Thread Ben Doom
using CFMX. I'm not very good with Regexs so I'm not sure what's wrong, but it seems to not be stripping anything out. John -Original Message- From: Jerry Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 12:41 PM To: CF-Talk Subject: Re: RegEx help What

Re: RegEx help

2004-10-21 Thread Jerry Johnson
A bigger question is whether my logic holds together. Sanity check from a ninja, please. Notes: I assumed matching the fieldname's case was a good thing (to reduce false positives) I assumed the characters before and after the data were, in fact, spaces (chr(32)). If not, then maybe the

RE: RegEx help

2004-10-21 Thread Burns, John D
, 2004 1:28 PM To: CF-Talk Subject: Re: RegEx help Are you sure you've got the fieldname correct? Capitilization counts. If you want to do a case-insensitive search, use rereplacenocase() instead. --Ben Burns, John D wrote: Hmmm, I think I see what you're trying to do there, but it doesn't work

Re: RegEx help

2004-10-21 Thread Ben Doom
Jerry Johnson wrote: Notes: I assumed matching the fieldname's case was a good thing (to reduce false positives) I would have assumed the same. That was my first thought. I assumed the characters before and after the data were, in fact, spaces (chr(32)). If not, then maybe the

RE: RegEx help

2004-10-21 Thread Burns, John D
, October 21, 2004 2:09 PM To: CF-Talk Subject: Re: RegEx help Jerry Johnson wrote: Notes: I assumed matching the fieldname's case was a good thing (to reduce false positives) I would have assumed the same. That was my first thought. I assumed the characters before and after the data were

Re: RegEx help

2004-10-21 Thread Ben Doom
PROTECTED] Sent: Thursday, October 21, 2004 1:28 PM To: CF-Talk Subject: Re: RegEx help Are you sure you've got the fieldname correct? Capitilization counts. If you want to do a case-insensitive search, use rereplacenocase() instead. --Ben

RE: RegEx help

2004-10-21 Thread Jerry Johnson
Both! You should probably replace the second and third spaces with the generic space class. This will allow tabs, returns, and spaces. [[:space:]] The last character issue I didn't handle at all. Maybe something along these lines (completely not tested) cfset fieldName=FirstName cfset

RE: RegEx help

2004-10-21 Thread Burns, John D
) was not a space, but rather a line break, this wouldn't work. What would I need to make sure this would work if the value was the last item on a line? John -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 2:20 PM To: CF-Talk Subject: Re: RegEx help

Re: RegEx help

2004-10-21 Thread Jerry Johnson
I'm thinking there is a line feed or tab (which looks like a space in outputed HTM) between the Bob and the LastName. Jerry Johnson [EMAIL PROTECTED] 10/21/04 02:20PM That doesn't make any sense. I'm scratching my head on this one. I just ran a quick test (empasis on quick) and it seemed

RE: RegEx help

2004-10-21 Thread Burns, John D
PROTECTED] Sent: Thursday, October 21, 2004 2:27 PM To: CF-Talk Subject: RE: RegEx help Both! You should probably replace the second and third spaces with the generic space class. This will allow tabs, returns, and spaces. [[:space:]] The last character issue I didn't handle at all. Maybe

RE: RegEx help

2004-10-21 Thread Jerry Johnson
I might have jumped too many steps myself. The \1 is a varaible created by the first set of (). the () say grab whatever you find in between here, and save it for later use The \1 is because it was the first answer grabbed. If we wanted the second set grabbed, it would be \2, and so on. Try

Re: RegEx help

2004-10-21 Thread Ben Doom
- From: Jerry Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 2:27 PM To: CF-Talk Subject: RE: RegEx help Both! You should probably replace the second and third spaces with the generic space class. This will allow tabs, returns, and spaces. [[:space:]] The last

Re: RegEx help

2004-10-21 Thread Jerry Johnson
Got frisky with the [] brackets. (Must be missing the old days when ][ meant a really good computer and + meant a whopping 16KB extra RAM) Jerry Johnson [EMAIL PROTECTED] 10/21/04 02:41PM Oops! A slight mistake in there.

RE: RegEx help

2004-10-21 Thread Burns, John D
: Thursday, October 21, 2004 2:41 PM To: CF-Talk Subject: Re: RegEx help Oops! A slight mistake in there. reReplaceNoCase(content,.*#fieldName#:[[:space:]]+([^[:space:]]+)($|[[: space:]]+.*),\1) Some notes: [[:space:]] represents spaces, tabs, various end-of-line characters (10 and 13 for sure

RE: RegEx help

2004-10-21 Thread Ewok
- From: Burns, John D [mailto:[EMAIL PROTECTED] Sent: Thursday, October 21, 2004 12:26 PM To: CF-Talk Subject: RegEx help I'm trying to parse through some information in a text document where there is information like this: Text text text text text text text FirstName: Bob Age: 30 text text text

Re: Regex help

2004-09-14 Thread Dirk De Bock - Listclient
This is working ok in CF5 but apparently not in CFMX Malformed regular _expression_ \[[^\]*\]. Reason: Unmatched [] in _expression_.. REReplace(ThisTag.GeneratedContent, \[[^\]*\], , All) it's supposed to strip all [] with everyting inbetween the brackets [Todays Threads] [This Message]

RE: [Spam?] Re: Regex help

2004-09-14 Thread Pascal Peters
-Talk Subject: [Spam?] Re: Regex help This is working ok in CF5 but apparently not in CFMX Malformed regular _expression_ \[[^\]*\]. Reason: Unmatched [] in _expression_.. REReplace(ThisTag.GeneratedContent, \[[^\]*\], , All) it's supposed to strip all [] with everyting inbetween

RE: Regex help

2004-07-03 Thread Pascal Peters
The answer is (w{3})? , but in your case: why bother? -Original Message- From: Michael T. Tangorre [mailto:[EMAIL PROTECTED] Sent: 03 July 2004 05:52 To: CF-Talk Subject: RE: Regex help How would I say Www is optional? var linkRE = /^https?\:\/\/[wW]{3}?/; [Todays Threads

RE: Regex help

2004-07-03 Thread Pascal Peters
of most formats. I seem to remember it didn't validate IPs or ports but most of the rest. I left my copy at work, so I can't verify. Pascal -Original Message- From: Michael T. Tangorre [mailto:[EMAIL PROTECTED] Sent: 03 July 2004 05:20 To: CF-Talk Subject: RE: Regex help If you

Re: Regex help

2004-07-03 Thread Claude Schneegans
Im not sure what the best check would be The best would sure be to CFHTTP the addres and check for the code returned. Even a syntactically correct address may be a bad address. -- ___ REUSE CODE! Use custom tags; See

Regex help

2004-07-02 Thread Michael T. Tangorre
Does anyone have a regex handy to check a potential link. For instance: I need to make sure the link specified is in the following format http://www.whatever OR http://something Im not sure what the best check would be, I guess this is the least common denominator for strictly http links.

Re: Regex help

2004-07-02 Thread Dick Applebaum
On Jul 2, 2004, at 8:01 PM, Michael T. Tangorre wrote: Does anyone have a regex handy to check a potential link. For instance: I need to make sure the link specified is in the following format http://www.whatever OR http://something Im not sure what the best check would be, I guess this is

RE: Regex help

2004-07-02 Thread Michael T. Tangorre
If you are just scanning text to find any links, just look for something like: 'http://[^ ]* Dick, I have a variation of above which checks for http or https followed by a : followed by a an optional www followed by any number of letters, numbers or periods. I just wanted to make sure I am

RE: Regex help

2004-07-02 Thread Michael T. Tangorre
How would I say Www is optional? var linkRE = /^https?\:\/\/[wW]{3}?/; Mike [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: Regex help

2004-07-02 Thread Dick Applebaum
You are on the right track, You might need to use several regexps to extract any valid format, then see if you have anything left. AFAIK, valid chars would be: cfset V = [A-Za-z0_-] / so you check for 1-n V period 1-n V period 1-n V that takes char of the domain address from now on you also

Re: Regex help

2004-07-02 Thread Dick Applebaum
more accurately you should say [A-Za-z0-9]+ one or more of the above -- www is acceptable, but not required. Dick On Jul 2, 2004, at 8:52 PM, Michael T. Tangorre wrote: How would I say Www is optional? var linkRE = /^https?\:\/\/[wW]{3}?/; Mike [Todays Threads] [This Message]

Regex help

2004-04-02 Thread Burns, John D
I've dabbled in regex, but am not very good at it yet :-)Anyone willing to help with this would be extremely helpful. I have a string (actually coming from cgi.http_referer) and I append a variable to the end to pass the status of an operation back to the original page.I do this for errors and

RE: Regex help

2004-04-02 Thread Barney Boisvert
: Friday, April 02, 2004 10:43 AM To: CF-Talk Subject: Regex help I've dabbled in regex, but am not very good at it yet :-)Anyone willing to help with this would be extremely helpful. I have a string (actually coming from cgi.http_referer) and I append a variable to the end to pass

<    1   2   3   4   5   6   7   >