Re: Regular Expression Help

2011-06-14 Thread Patrick Santora
If you'd like you can use the underlying java implementation of replaceAll. Cfset str = ~{Test Information2/a/li~{Test Information/a/li~{Test Information4/a/li~{Test Information/a/li / cfdump var=#str.replaceAll( ([a-zA-Z0-9])/a/li, $1}~/a/li )# / Should show: ~{Test Information2}~/a/li~{Test

Re: Regular Expression Help

2011-06-14 Thread Patrick Santora
This might be more of what you are looking for. It captures special characters as well and should fit more in line to what you want. Cfset str = ~{Test Infor$%mation2$/a/li~{Test Information/a/li~{Test Information4/a/li~{Test Information/a/li / cfdump var=#str.replaceAll( (~\{.*?)/a/li,

Re: Regular Expression Help

2011-06-14 Thread Peter Boughton
Give this a go: cfset Result = InputText.replaceAll ( '~\{(?:(?!/a).)+(?!\}~)(?=/a/li)' , '$0}~' ) / It uses the java replaceAll regex function so that it can do the negative lookbehind to ensure existing correct items are not changed, meaning it can be run

Re: Regular Expression Help

2011-06-14 Thread Patrick Kerley
Sent: Tuesday, June 14, 2011 12:16 PM Subject: Re: Regular Expression Help Give this a go:     cfset Result = InputText.replaceAll         ( '~\{(?:(?!/a).)+(?!\}~)(?=/a/li)'         , '$0}~'         ) / It uses the java replaceAll regex function so that it can do the negative lookbehind

Re: Regular Expression help

2008-10-31 Thread Jason Fisher
I think you want something like this: cfif REFindnocase(([\s\]#badword#[\s\]),skills) You may want to expand it to non-alphanumeric wrappers, though, to catch punctuation: he gave her a kiss. cfif REFindnocase(([\W]#badword#[\W]),skills) which is the same as cfif

Re: Regular Expression help

2008-10-31 Thread Matthew Friedman
Not sure what I am doing wrong but this is not working. I have the string kissess are goodbrkissbrthe girlfriend Kiss is a badword, and this regexp is not picking it up. Please advise and thanks for your help. Matt I think you want something like this: cfif

Re: Regular Expression help

2008-10-31 Thread Jason Fisher
Hm, that should work, certainly. Did you try that 3rd option? cfif REFindnocase(([^a-zA-Z0-9_]#badword#[^a-zA-Z0-9_]),skills) That should find any use of the word 'kiss' when it's surrounded by any non-alpha characters. Sadly I don't have access to my CF environment right at the moment,

Re: Regular Expression help

2008-10-31 Thread Jason Fisher
Forgot about Ryan Swanson's slick little tool. It certainly validates and picks up the middle 'kiss' in his validator, using either '\W' or '^a-zA-Z0-9_' as the filter: http://ryanswanson.com/regexp/#start ~| Adobe®

Re: Regular Expression help

2008-10-31 Thread Matthew Friedman
Figured out the issue, this works great. Thank you, thank you, thank you ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: Regular Expression help

2008-10-31 Thread Matthew Friedman
I just found an issue with this regexp cfif REFindnocase(([^a-zA-Z0-9_]#badword#[^a-zA-Z0-9_]),clean_skills) this works great if it is not the first word or only word in the string. what do I need to do to update the regexp to pick up the bad word it is the first last or only word in the

Re: Regular Expression help

2008-10-31 Thread Sonny Savage
Typo: cfif REFindnocase(((^|\W)#badword#(\W|$)),clean_skills) On Fri, Oct 31, 2008 at 1:09 PM, Sonny Savage [EMAIL PROTECTED] wrote: cfif REFindnocase(((^|\W)#badword#(\W|$),clean_skills) On Fri, Oct 31, 2008 at 1:04 PM, Matthew Friedman [EMAIL PROTECTED]wrote: I just found an issue with

Re: Regular Expression help

2008-10-31 Thread Jason Fisher
Good call. Try this, seems to work in initial testing: cfif REFindnocase(((^|[^a-zA-Z0-9_])#badword#([^a-zA-Z0-9_]|$)), clean_skills) I just found an issue with this regexp cfif REFindnocase(([^a-zA-Z0-9_]#badword#[^a-zA-Z0-9_]), clean_skills) this works great if it is not the first

Re: Regular Expression help

2008-10-31 Thread Sonny Savage
cfif REFindnocase(((^|\W)#badword#(\W|$),clean_skills) On Fri, Oct 31, 2008 at 1:04 PM, Matthew Friedman [EMAIL PROTECTED] wrote: I just found an issue with this regexp cfif REFindnocase(([^a-zA-Z0-9_]#badword#[^a-zA-Z0-9_]),clean_skills) this works great if it is not the first word or

Re: Regular Expression Help on Email Addresses

2007-02-21 Thread Eric Haskins
I am working on a variable mask version as I have time. This one will atleast mask the domain for now. Eric On 2/20/07, Eric Haskins [EMAIL PROTECTED] wrote: cfset email = ReReplaceNocase(email, ([a-zA-Z0-9_\-\.]+)@((([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3}), [EMAIL PROTECTED])/ Try

Re: Regular Expression Help on Email Addresses

2007-02-21 Thread Eric Haskins
cfset variables.domainlen = Len(ReReplaceNocase(attributes.email, ([a-zA-Z0-9_\-\.]+)@((([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3}), \2)) - 1 cfset variables.mask = cfloop from=1 to=#variables.domainlen# index=i cfset variables.mask = variables.mask * /cfloop cfset variables.email =

Re: Regular Expression Help on Email Addresses

2007-02-20 Thread Eric Haskins
cfset email = ReReplaceNocase(email, ([a-zA-Z0-9_\-\.]+)@((([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3}), [EMAIL PROTECTED])/ Try this one Eric On 2/20/07, K Simanonok [EMAIL PROTECTED] wrote: I would like to use a regular expression to camouflage email addresses in a forum I'm building.

Re: Regular Expression Help on Email Addresses

2007-02-20 Thread Ben Doom
Offhand, I think your best bet is to use a regex to identify everything from the @ to the TLD, then use the len returned by refind to do a replace of it. There are a number of really good regexes for finding/dissecting emails out there. CFLib.org is a good place to start. --Ben Doom K

RE: Regular Expression Help

2007-01-29 Thread Ben Nadel
Not really sure what exactly you are looking to do, but the regular expression pattern for numbers under 100 with 7 decimals would be: \d{2}(\.\d{1,7})? This makes the decimal optional (with 1 to 7 decimal places). Of course, this does not protect AGAINST numbers over one hundred. For that you

Re: Regular Expression Help

2007-01-29 Thread Ben Doom
Ben Nadel wrote: Not really sure what exactly you are looking to do, but the regular expression pattern for numbers under 100 with 7 decimals would be: \d{2}(\.\d{1,7})? I'd anchor it, assuming that this is supposed to be the whole string: ^\d{2}(\.\d{1,7})?$ --Ben Doom

RE: Regular Expression Help

2007-01-29 Thread Ben Nadel
: Regular Expression Help Ben Nadel wrote: Not really sure what exactly you are looking to do, but the regular expression pattern for numbers under 100 with 7 decimals would be: \d{2}(\.\d{1,7})? I'd anchor it, assuming that this is supposed to be the whole string: ^\d{2}(\.\d{1,7})?$ --Ben

RE: Regular Expression Help

2007-01-29 Thread Bobby Hartsfield
That would not match 0 through 9.999 unless they were formatted into 2 digit numbers like 00, 01, etc... 09.999 It also wouldn’t match anything between 1 and 0 like .999 unless it was formatted like 00.999 Try this one: ^\d{0,2}(\.\d{1,7})?$ I don’t know what you are using it for

RE: Regular Expression Help....

2007-01-24 Thread Ben Nadel
Dave, While you probably don't need this anymore, I thought I would post it up here as your question inspired my blog post: http://www.bennadel.com/blog/487-Using-Verbose-Regular-Expressions-To-Ex plain-Url-Auto-Linking-In-ColdFusion.htm [ OR http://bennadel.com/index.cfm?dax=blog:486.view ]

RE: Regular Expression Help....

2007-01-24 Thread Dave Phillips
:31 PM To: CF-Talk Subject: Re: Regular Expression Help Dave how did it turn out?? ~Eric ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http:http

RE: Regular Expression Help....

2007-01-23 Thread Andy Matthews
This page might get you pointed in the right direction. http://foad.org/~abigail/Perl/url2.html -Original Message- From: Dave Phillips [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 23, 2007 8:36 AM To: CF-Talk Subject: Regular Expression Help Hi, RegExp's are not my forte and

RE: Regular Expression Help....

2007-01-23 Thread Andy Matthews
This one might be better: http://www.manamplified.org/archives/000318.html -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 23, 2007 9:50 AM To: CF-Talk Subject: RE: Regular Expression Help This page might get you pointed in the right

Re: Regular Expression Help....

2007-01-23 Thread Dave Phillips
Thanks, I'm working on something with that now, but does anyone know if there is a function or tag out there someone has already written that does this? It seems that I should not be the first person who needs to feed a function a body of text and get back a list of the URL's in that text.

Re: Regular Expression Help.... (Solution?)

2007-01-23 Thread Dave Phillips
I think I have a solution, but if a few of you could review and see if it can be any faster or more efficient (or if I'm missing something) I'd appreciate it. To find the end of the URL I'm looking for a single quote, double quote or space. function extractURLs(inputString) { var

RE: Regular Expression Help....

2007-01-23 Thread Ben Nadel
? www.bennadel.com/ask-ben/ -Original Message- From: Dave Phillips [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 23, 2007 9:55 AM To: CF-Talk Subject: Re: Regular Expression Help Thanks, I'm working on something with that now, but does anyone know if there is a function or tag out there someone

RE: Regular Expression Help.... (Solution?)

2007-01-23 Thread Ben Nadel
, 2007 10:25 AM To: CF-Talk Subject: Re: Regular Expression Help (Solution?) I think I have a solution, but if a few of you could review and see if it can be any faster or more efficient (or if I'm missing something) I'd appreciate it. To find the end of the URL I'm looking for a single quote

Re: Regular Expression Help....

2007-01-23 Thread Dave Phillips
Hi, The RegExp below is giving me more than I want. It is returning things that I don't want: mailto: urn:schemas-microsoft-com:office:office and others. I want to chnage it to only return url's starting with http: or https:. Here's what I currently have:

Re: Regular Expression Help....

2007-01-23 Thread Eric Haskins
When I test it tells me not enough ( I am troubleshooting it now out sick today but list draws me back everytime lol Eric On 1/23/07, Dave Phillips [EMAIL PROTECTED] wrote: Hi, The RegExp below is giving me more than I want. It is returning things that I don't want: mailto:

RE: Regular Expression Help....

2007-01-23 Thread Bobby Hartsfield
Try this one https?:)\/\/)|(www\.|ftp\.))[-[:alnum:]\?%,\.\/##!@:=\+~_]+[A-Za-z0-9\/ ]) -Original Message- From: Dave Phillips [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 23, 2007 2:03 PM To: CF-Talk Subject: Re: Regular Expression Help Hi, The RegExp below is giving me

Re: Regular Expression Help....

2007-01-23 Thread Eric Haskins
(?:href=|href=|href=')((?:http|https)://(.+))(?:|'|) Does this help at all??? This will find all http or https links?? Eric On 1/23/07, Eric Haskins [EMAIL PROTECTED] wrote: When I test it tells me not enough ( I am troubleshooting it now out sick today but list draws me back

RE: Regular Expression Help....

2007-01-23 Thread Bobby Hartsfield
, January 23, 2007 2:03 PM To: CF-Talk Subject: Re: Regular Expression Help Hi, The RegExp below is giving me more than I want. It is returning things that I don't want: mailto: urn:schemas-microsoft-com:office:office and others. I want to chnage it to only return url's starting with http

Re: Regular Expression Help....

2007-01-23 Thread Eric Haskins
Dave how did it turn out?? ~Eric ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs

RE: Regular expression help

2005-08-10 Thread Jim Davis
-Original Message- From: John Munyan [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 10, 2005 3:03 AM To: CF-Talk Subject: Regular expression help Hi, I have an url such as http://www.blah.com/something/somethingelse/default.cfm stored in a database. I wish to use this

Re: Regular Expression help

2005-05-31 Thread Rey Bango
I found the fix guys!!! Amazing what a little Googling will do. :P Rey... Rey Bango wrote: Guys, I have the following email check but it won't accept a .info email address. I'm not a regular expression expert and was hoping someone could help me out with this. How could I update the

RE: Regular Expression Help

2004-11-05 Thread Pascal Peters
REReplaceNoCase(text,'^.*input type=hidden name=BV_SessionID value=([^]*).*$',\1) Pascal -Original Message- From: Daniel Farmer [mailto:[EMAIL PROTECTED] Sent: 05 November 2004 10:24 To: CF-Talk Subject: Regular Expression Help I'm searching a long string and looking for the

Re: Regular Expression Help

2004-11-05 Thread Daniel Farmer
Thanks Pascal... but I am having problems implementing cfset theval = #REFind('^.*input type=hidden name=BV_SessionID value=([^]*).*$',\1,)#, cfhttp.filecontent, startpos )# ~| Special thanks to the CF Community Suite Gold

RE: Regular Expression Help

2004-11-05 Thread Gavin Brook
- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: 05 November 2004 10:43 To: CF-Talk Subject: RE: Regular Expression Help REReplaceNoCase(text,'^.*input type=hidden name=BV_SessionID value=([^]*).*$',\1) Pascal -Original Message- From: Daniel Farmer [mailto:[EMAIL PROTECTED

RE: Regular Expression Help

2004-11-05 Thread Pascal Peters
cfset theval = REReplaceNoCase(cfhttp.filecontent,'^.*input type=hidden name=BV_SessionID value=([^]*).*$',\1) Pascal -Original Message- From: Daniel Farmer [mailto:[EMAIL PROTECTED] Sent: 05 November 2004 11:10 To: CF-Talk Subject: Re: Regular Expression Help Thanks Pascal

RE: Regular Expression Help

2004-11-05 Thread Pascal Peters
November 2004 12:11 To: CF-Talk Subject: RE: Regular Expression Help Pascal, Would it be possible for you to explain a bit more about what each part of the RegEx is doing? I'm trying to do something similar and I'm having no end of trouble getting the RegEx right. MM documentation

RE: Regular expression help with dictionary definitions

2004-07-13 Thread Pascal Peters
If this is the actual code you are using, you are creating an infinite loop because you always start looking at the start position 1 in your REFind. It will keep matching the first {}. It really depends what you are trying to grab. If you are trying to get only the inner parentheses it is not too

RE: Regular Expression Help

2004-05-18 Thread Pascal Peters
On CFMX stTmp = REFindNoCase('msg:(.*?);',str,1,true); if(stTmp.pos[1]){ message = Mid(str,stTmp.pos[2],stTmp.len[2]); } else { message = ; } ON CF5 stTmp = REFindNoCase('msg:(([^]|[^;])*);',str,1,true); if(stTmp.pos[1]){ message = Mid(str,stTmp.pos[2],stTmp.len[2]); } else { message = ; }

RE: Regular Expression Help

2004-05-17 Thread Marlon Moyer
This should work. cfset test = (msg:My Message Here; content:My Content Here;) cfset temp = refindnocase(msg:([^;]*),test,1,yes) cfloop from=1 to=#arraylen(temp.pos)# index=i cfoutput#mid(test,temp.pos[i],temp.len[i])#br/cfoutput /cfloop -- Marlon Moyer, Sr. Internet Developer American

RE: Regular expression help

2004-02-17 Thread Pascal Peters
cfscript regexp = ##[[:space:]]*([0-9]{2-3}); stTmp = REFindNoCase(regexp,str,1,true); if(stTmp.pos[1]) result = Mid(str,stTmp.pos[2],stTmp.len[2]); else result = ; /cfscript If you need to find all, you do it in a loop: cfscript regexp = ##[[:space:]]*([0-9]{2-3}); results = ArrayNew(1);

RE: Regular expression help

2004-02-16 Thread Matthew Walker
How about this? cfset result = reFind(##[[:space:]]*([[:digit:]]+), myString, 1, true) cfif result.pos[1] cfoutput#mid(myString, result.pos[2], result.len[2])#/cfoutput /cfif -Original Message- From: Andy Ousterhout [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 February 2004 11:05 a.m.

Re: Regular Expression Help

2003-09-26 Thread Ben Doom
What version of CF?--Ben the RegEx Ninja Doomkelly wrote:Ok I suck at reg expressions.Basically I have some data and within the data there is some stuff I want to remove.Example text text a href="" href="http://www.blah.comblah">http://www.blah.comblah http://www.blah.comblah blah blah blah/a

Re: Regular Expression Help

2003-09-26 Thread Claude Schneegans
Ok basically I want to remove everything from a href through /a althoughit will be different on every line.This is tipically the situation why I developed CF_REextract (seehttp://www.contentbox.com/claude/customtags/tagstore.cfm?p=hf(see specs and examples)The tag will find all occurences, and

RE: Regular Expression Help

2002-12-06 Thread Joshua Miller
ReReplaceNoCase(string,[[:punct:]],_,ALL) Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext. 254 * Any views expressed in

RE: Regular Expression Help

2002-12-06 Thread Joshua Miller
Oh, forgot the space use [[:punct:]]||[[:space:]] as the RegEX Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext. 254 *

RE: Regular Expression Help

2002-12-06 Thread Mike Townend
Something like CFSET sNewString = REReplace(sOldString, [[:punct:][:space:]], , ALL) HTH -Original Message- From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] Sent: Friday, December 6, 2002 17:31 To: CF-Talk Subject: Regular Expression Help I am trying to use a regular expression to

RE: Regular Expression Help

2002-12-06 Thread Raymond Camden
It's as simple as: cfset str = reReplace(!@##\$%\^\*()-+={[}]|\\:;',\.\?/,_,all) Notice I had to escape out the # and for CF and a few character that regex use like . and *. It's possible I may have missed one though. ===

RE: Regular Expression Help

2002-12-06 Thread Jeff D. Chastain
That was what I was looking for, I just had not found it yet. Thanks -Original Message- From: Joshua Miller [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 11:42 AM To: CF-Talk Subject: RE: Regular Expression Help ReReplaceNoCase(string,[[:punct:]],_,ALL) Joshua Miller

RE: Regular Expression Help

2002-12-06 Thread Raymond Camden
: Friday, December 06, 2002 11:43 AM To: CF-Talk Subject: RE: Regular Expression Help Oh, forgot the space use [[:punct:]]||[[:space:]] as the RegEX Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044 ext

RE: Regular Expression Help

2002-12-06 Thread Jeff D. Chastain
How do you not replace a non-existent space before and after the string? Everything else works great. Thanks -Original Message- From: Joshua Miller [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 11:43 AM To: CF-Talk Subject: RE: Regular Expression Help Oh, forgot the space

RE: Regular Expression Help

2002-12-06 Thread Teel, C. Doug
I think you accidentally doubled the pipes between the punct and space. It should be: [[:punct:]]|[[:space:]] Thanks, Doug -Original Message- From: Joshua Miller [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 11:43 AM To: CF-Talk Subject: RE: Regular Expression Help Oh

RE: Regular Expression Help

2002-12-06 Thread Rob Rohan
]] Sent: Friday, December 06, 2002 11:43 AM To: CF-Talk Subject: RE: Regular Expression Help Oh, forgot the space use [[:punct:]]||[[:space:]] as the RegEX Joshua Miller Head Programmer / IT Manager Garrison Enterprises Inc. www.garrisonenterprises.net [EMAIL PROTECTED] (704) 569-9044

RE: Regular Expression Help

2002-12-06 Thread Raymond Camden
My ally is the Force, and a powerful ally it is. - Yoda -Original Message- From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 11:53 AM To: CF-Talk Subject: RE: Regular Expression Help How do you not replace a non-existent space before and after

RE: Regular Expression Help

2002-12-06 Thread Joshua Miller
] * -Original Message- From: Rob Rohan [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 12:54 PM To: CF-Talk Subject: RE: Regular Expression Help lastly, you could think backwards [^A-Za-z0-9] Rob http

RE: Regular Expression Help

2002-12-06 Thread Jeff D. Chastain
' returns '_some_phrase_' instead of 'some_phrase' which is what I was looking for. Thanks -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 11:54 AM To: CF-Talk Subject: RE: Regular Expression Help What is a non-existent space? How could

RE: Regular Expression Help

2002-12-06 Thread Jeff D. Chastain
Yep, this is probably the safest bet and produces the expected result. Thanks -Original Message- From: Rob Rohan [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 11:54 AM To: CF-Talk Subject: RE: Regular Expression Help lastly, you could think backwards [^A-Za-z0-9] Rob

RE: Regular Expression Help

2002-12-06 Thread Joshua Miller
and advise us by return e-mail to [EMAIL PROTECTED] * -Original Message- From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 1:03 PM To: CF-Talk Subject: RE: Regular Expression Help

RE: Regular Expression Help

2002-12-06 Thread Jeff D. Chastain
, the first method works just fine and is probably safer. -Original Message- From: Joshua Miller [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 12:30 PM To: CF-Talk Subject: RE: Regular Expression Help Did you TRIM the variable first? That may help ... Perhaps there's whitespace

RE: Regular Expression Help

2002-12-06 Thread Ben Doom
, Post to, or Join the list here for all your RegEx needs. :-) --Ben Doom Programmer General Lackey Moonbow Software : -Original Message- : From: Joshua Miller [mailto:[EMAIL PROTECTED]] : Sent: Friday, December 06, 2002 12:43 PM : To: CF-Talk : Subject: RE: Regular Expression

RE: regular expression help

2002-07-09 Thread Tangorre, Michael
Mark, I am fairly new to RegEx, but I can tell you we did this on our University's site when I was in college. We allowed the different departments to submit formatted text using an assortment of HTML tags that we specified. We used RegEx to do this, and did not notice a performace hit at all.

Re: regular expression help

2002-07-09 Thread Michael Dinowitz
If you have a limited range of accepted tags then the following will probably be your best bet. 1. find all of the tags you want to allow. 2. replace their brackets with some non-standard character (like a yen symbol). 3. remove all other tags that exist. 4. replace your yen with brackets

RE: Regular Expression Help

2002-03-03 Thread Pascal Peters
-Talk Subject: Re: Regular Expression Help On Sat, 2002-03-02 at 10:10, Jared Stark wrote: Hello all. I am trying to write a simple search engine, and would like to replace certain commonly used prepositions from the search string such as 'a','the','for', etc... I have an array

Re: Regular Expression Help

2002-03-02 Thread James Sleeman
On Sat, 2002-03-02 at 10:10, Jared Stark wrote: Hello all I am trying to write a simple search engine, and would like to replace certain commonly used prepositions from the search string such as 'a','the','for', etc I have an array of the prepositions that I would like to remove, however

Re: Regular Expression Help

2002-03-02 Thread Douglas Brown
Sleeman [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, March 02, 2002 4:28 AM Subject: Re: Regular Expression Help On Sat, 2002-03-02 at 10:10, Jared Stark wrote: Hello all. I am trying to write a simple search engine, and would like to replace certain commonly used prepositions

RE: Regular Expression Help

2002-03-01 Thread Shawn Grover
Going from limited memory of the subject here, but try something like this: [\w the|a|..] (the 'the|a|..' part would be your preposition list...) I think the \w means you are looking for whole words. Or it might be \W... Hope that helps some... Shawn Grover -Original

Re: Regular Expression Help

2002-03-01 Thread Matthew Walker
Or you could use ListReplace with as the delimiter -- as long as you force everything lower case first. - Original Message - From: Jared Stark [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Saturday, March 02, 2002 10:10 AM Subject: Regular Expression Help Hello all. I am

Re: Regular expression help

2002-01-16 Thread Gyrus
I have a field that will be populated with a first name and a last name, what I want to do is make sure that the first letter of the first last name is uppercase and that all others are lower case. Could someone help in a reg expression that will do this? I'm having problems finding ways

RE: Regular expression help

2002-01-16 Thread Christopher Olive
try CFIF REFind(^[A-Z][a-z]+, VARIABLENAME) it's capitalized! /CFIF christopher olive, cto, vp of web development cresco technologies, inc 410.825.0383 http://www.crescotech.com -Original Message- From: Douglas Brown [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 1:46 PM

Re: Regular expression help

2002-01-16 Thread Douglas Brown
, 2002 11:20 AM Subject: RE: Regular expression help try CFIF REFind(^[A-Z][a-z]+, VARIABLENAME) it's capitalized! /CFIF christopher olive, cto, vp of web development cresco technologies, inc 410.825.0383 http://www.crescotech.com -Original Message- From: Douglas Brown

RE: Regular expression help

2002-01-16 Thread Christopher Olive
: Wednesday, January 16, 2002 11:20 AM Subject: RE: Regular expression help try CFIF REFind(^[A-Z][a-z]+, VARIABLENAME) it's capitalized! /CFIF christopher olive, cto, vp of web development cresco technologies, inc 410.825.0383 http://www.crescotech.com -Original Message- From

Re: Regular expression help

2002-01-16 Thread Douglas Brown
this to be a coincidence. Doug Brown - Original Message - From: Douglas Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 11:43 AM Subject: Re: Regular expression help That definately will not do it. There are two major products that come out

RE: Regular expression help

2002-01-16 Thread Christopher Olive
: Wednesday, January 16, 2002 3:00 PM To: CF-Talk Subject: Re: Regular expression help All refind does is find the starting position of a string. IE: CFSET test = REFind(^[A-Z][a-z]+, hello world) CFOUTPUT #test# /CFOUTPUT returns 0 I need it to change hello world to Hello World There are two

Re: Regular expression help

2002-01-16 Thread Bryan Stevenson
] - Macromedia Associate Partner www.macromedia.com - Original Message - From: Douglas Brown [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Wednesday, January 16, 2002 12:00 PM Subject: Re: Regular expression help All refind does is find

RE: Regular expression help

2002-01-16 Thread James Ang
opinion. :) Of course, RegExp has its uses. In your case, it isn't the most optimal solution. James. -Original Message- From: Douglas Brown [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 12:00 PM To: CF-Talk Subject: Re: Regular expression help All refind does is find

RE: Regular expression help

2002-01-16 Thread Bruce, Rodney (Contractor)
Here's a UDF I may not be the most eloquent but it does work. I used it to do tile casing. why my string is title ;o) CFscript //Changes a String to Title case Function TitleCase(title){ title = trim(title); //Caps first letter of string and

RE: Regular expression help

2002-01-16 Thread Bruce, Rodney (Contractor)
There was a /CFSCRIPT at the bottom, must have gotten cut off. -Original Message- From: Bruce, Rodney (Contractor) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 1:05 PM To: CF-Talk Subject: RE: Regular expression help Here's a UDF I may not be the most eloquent

Re: Regular expression help

2002-01-16 Thread Jochem van Dieten
Douglas Brown wrote: I have a field that will be populated with a first name and a last name, what I want to do is make sure that the first letter of the first last name is uppercase and that all others are lower case. Could someone help in a reg expression that will do this? It is

Re: Regular expression help

2002-01-16 Thread Douglas Brown
, January 16, 2002 11:57 AM Subject: RE: Regular expression help Use the UDF: capFirstTitle() http://www.cflib.org/udf.cfm?ID=116 For your purpose, CF RegExp won't do it as well as what Ed Hodder implemented with his UDF. But, FYI, REFind() and REFindNoCase() can return subexpressions. Example

RE: regular expression help!

2001-11-09 Thread Pascal Peters
string = string.replace(/HEAD[^]*[.\n]*\/HEAD/gi,''); Pascal Peters Macromedia Certified Instructor Certified ColdFusion (5.0) Advanced Developer Certified Web Developer LR Technologies, Belgium Tel +32 2 639 68 70 Fax +32 2 639 68 99 Email [EMAIL PROTECTED] Web www.lrt.be

Re: regular expression help!

2001-11-08 Thread Brook Davies
You could just find the first head, store the position, find the next head, store the position, and then just use mid(string,pos+6,pos-1) to strip the middle out maybe there is a more efficient way Brook At 11:32 PM 08/11/01 +, you wrote: The code I'm doing now is actually in

Re: regular expression help!

2001-11-08 Thread Stuart Duncan
Try using cfset string=rereplace(string,(head)[[:print:]]*(/head),,all) That should find anything with a beginning of head and an ending of /head and strip them out and any printable character in between with an empty string. I'm not sitting at a coldfusion enabled server, so I can't verify,

RE: Regular Expression Help

2001-07-27 Thread Thomas Chiverton
Dain, thank you very much. Is it safe to assume then that anything else i want to search for can be added by placing the definition inside another pair of brackets? Yeah, square brackets define a class to match against, and clasess are or'ed together. [^ ] would match everything that

Re: Regular Expression Help

2001-07-27 Thread Dain Anderson
PROTECTED] To: CF-Talk [EMAIL PROTECTED] Sent: Friday, July 27, 2001 1:39 AM Subject: Re: Regular Expression Help Dain, thank you very much. Is it safe to assume then that anything else i want to search for can be added by placing the definition inside another pair of brackets? REFindNoCase

Re: Regular Expression Help

2001-07-27 Thread eric . laney
: nc.rr.comSubject: Re: Regular Expression Help

Re: Regular Expression Help

2001-07-27 Thread Dick Applebaum
I find that: [0-9] is clearer and easier to type than: [:digit:] of course, I'd rather have: \d I do very well without ever using the posix-style. Dick At 8:56 AM -0400 7/27/01, [EMAIL PROTECTED] wrote: Being a Perl programmer also, this is one of the things that really

Re: Regular Expression Help

2001-07-26 Thread Dain Anderson
John, You almost had it (too many brackets): cfif REFindNoCase([[:Alpha:][:Punct:]], myString) Alpha characters or punctuation were found. cfelse No alpha characters or punctuation found. /cfif If you need to get the position of the first occurance of these characters, use subexpressions:

Re: Regular Expression Help

2001-07-26 Thread John Barleycorn
PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Re: Regular Expression Help Date: Thu, 26 Jul 2001 21:02:45 -0400 John, You almost had it (too many brackets): cfif REFindNoCase([[:Alpha:][:Punct:]], myString) Alpha characters or punctuation were found. cfelse

Re: Regular expression Help

2001-03-23 Thread Savan Thongvanh
OT: are there any statistics on how many developers regexp has made bald? ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives:

Re: Regular expression Help

2001-03-23 Thread Larry W. Virden
Re: use of regular expressions for parsing html One can reliably use regular expressions to parse html if it is html that you have direct and full editorial control over. That is, if you hand edit the html, AND you can keep all your requirements in mind, then you can use with some success

RE: Regular expression Help

2001-03-23 Thread Hayes, David
This works. CFSET theString = "meta name=""pubdate"" content=""Fri, 23 Mar 2001 07:00:00 GMT""" CFSET st = reFindNoCase("(content="")(.*)(GMT"")",theString,1,"TRUE") CFOUTPUT#mid(theString,st.pos[3],st.len[3])#/CFOUTPUT The two pieces are: 1) Creating the regularExpression 2) understanding

RE: Regular expression Help

2001-03-23 Thread Douglas Malcolm
Mallory, Try this: cfset newVar=REFind(varWithHTML,'meta name="pubdate"[^]+') That should return the string; meta name="pubdate" content="[some date]" Which you can then extract the date from. Good luck! Douglas Malcolm -Original Message- From: Mallory Woods [mailto:[EMAIL

RE: Regular expression Help

2001-03-23 Thread Scott Cavanaugh
This should work if you want the GMT included: REFINDNOCASE("meta name=""pubdate"" content=""([a-zA-Z0-9,: ]+[^"])""", YourStringNameGoesHere) This should work if you don't want GMT: REFINDNOCASE("meta name=""pubdate"" content=""([a-zA-Z0-9,: ]+[^GMT"])""", YourStringNameGoesHere) Remember CF

RE: Regular expression help

2001-03-15 Thread Douglas Malcolm
Leaves table tags in: cfset VariableWithTags=#REReplaceNoCase(VariableWithTags,'table([[:alpha:]]|[[:s pace:]]|[[:punct:]])+/table','table/table')# Removes table tags: cfset VariableWithTags=#REReplaceNoCase(VariableWithTags,'table([[:alpha:]]|[[:s pace:]]|[[:punct:]])+/table','')# Note

Re: Regular Expression Help?

2001-02-23 Thread Jamie Jackson
On Fri, 23 Feb 2001 10:33:10 +1300, in cf-talk you wrote: Firstly I'd like to mention that doing this is playing with fire. ;) Yeah, of course it is ;) Secondly, I'd suggest three replaces: 1. Replace application.cfm with an easily recognisable other string without application in the name. 2.

  1   2   >