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
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
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
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?
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
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
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
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
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:
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
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:
[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
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
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
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
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
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#,
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
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
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
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
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
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
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
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
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
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
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
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
:[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
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
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
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
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
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}$
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:
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
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
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
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
: 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
/
-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
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
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
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
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
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
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
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
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
: 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
(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
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
]
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
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
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
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
But I guess thats 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
]{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
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
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.
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
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
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. :-)
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-
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
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
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
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
Thats 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
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
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
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,
, 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
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
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
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 = ;
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
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:
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
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
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
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
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
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
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
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
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
-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
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
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
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
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
@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
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
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
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
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
--
___
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
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.
101 - 200 of 444 matches
Mail list logo