Hi there... trying to match the following... Where you see 'Part-Time' I want
to be optional any text.
%20Java%20Part-Time%20Developer%20
with the following code...
[%20]*java%20[\w+]*%20developer[%20]* -- does not work
%20java%20part-time%20developer%20 -- works
Hey Brian -
You have a couple of...not necessarily errors, but constructs that I
would consider unexpected. For example, [\w+]* when I think you
mean \w+. In a character class, \w+ means, literally, a w
character or a + character.
Try this:
%20java%20\w+%20developer%20
If you're allowing an
Hey, thanks Rob, tried that and it didn't seem to work.
Regarding the 'part-time' of that code. I would like the center element [\w+]*
to allow for word(s) and for it to be optional as well ( ie no words ). I
thought the code for a listing of multiple characters WAS in fact '\w+' ?
The problem, at least in this case is the - in Part-Time. It's a
non-word character. This works:
%20Java%20(\w+-?\w+)*%20Developer%20
It will allow for 0 or 1 dash in the optional text. It will also
allow for text or no text.
On 4/27/06, Brian McGarvie [EMAIL PROTECTED] wrote:
Hey, thanks
Okay, Regex is not my strong suite and this one has been eluding me all
morning. I'm trying to replace any occurrences of == inside a string
enclosed with single quotes. So my test string is:
cfset tempString=[CONFERENCE] == 'OPTION A - FULL CONFERENCE PACKAGE' OR
[CONFERENCE] == '69 == this
[mailto:[EMAIL PROTECTED]
Sent: 17 March 2005 22:08
To: CF-Talk
Subject: Reg Expression Help
Okay, Regex is not my strong suite and this one has been eluding me all
morning. I'm trying to replace any occurrences of == inside a string
enclosed with single quotes. So my test string is:
cfset tempString
#tempString#/pre
pre#REReplace(tempString, '(.*)?==(.*)?', '\1=\2',
ALL)#/pre
/cfoutput
Ade
-Original Message-
From: Brook Davies [mailto:[EMAIL PROTECTED]
Sent: 17 March 2005 22:08
To: CF-Talk
Subject: Reg Expression Help
Okay, Regex is not my strong suite and this one has been
pre#tempString#/pre
pre#REReplace(tempString, '(.*)?==(.*)?', '\1=\2',
ALL)#/pre
/cfoutput
Ade
-Original Message-
From: Brook Davies [mailto:[EMAIL PROTECTED]
Sent: 17 March 2005 22:08
To: CF-Talk
Subject: Reg Expression Help
Okay, Regex is not my strong suite and this one
folks,
If I wanted to find the value of the template attribute in a cfinclude
tag ... how would I do it using Regex?
-Mark
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription:
: Subject: reg expression help
:
:
: folks,
:
: If I wanted to find the value of the template attribute in a cfinclude
: tag ... how would I do it using Regex?
:
: -Mark
:
:
:
:
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t
: Re: reg expression help
folks,
If I wanted to find the value of the template attribute in a cfinclude
tag ... how would I do it using Regex?
-Mark
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription
Rick Lamb wrote:
Hoping someone with regular expression knowledge could help me. I need to
take a string and eliminate everything but numbers, - negative signs and
. decimal points. Basically just leaving pos and neg decimal numbers
filtering out anything else. Anyone willing to help?
Hoping someone with regular expression knowledge could help me. I need to
take a string and eliminate everything but numbers, - negative signs and
. decimal points. Basically just leaving pos and neg decimal numbers
filtering out anything else. Anyone willing to help?
Thanks,
Rick
13 matches
Mail list logo