no, same difference.  anyway, I thought CF required the double brackets
around the Posix thingies.  There's a whole paragraph about it in the old
Forta green book.  I did notice someone else's regex recently not using
them; is this a change in CFMX, or can you do this in ye olde versions of
CFML too?


Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


                                                                                       
                                 
                    Adrian Lynch                                                       
                                 
                    <[EMAIL PROTECTED]        To:     "'[EMAIL PROTECTED]'" <[EMAIL 
PROTECTED]>     
                    ubble.net>                cc:                                      
                                 
                                              Subject:     RE: [ cf-dev ] js -> cf 
regex                                
                    11/06/2003 14:23                                                   
                                 
                    Please respond to                                                  
                                 
                    dev                                                                
                                 
                                                                                       
                                 
                                                                                       
                                 



The first thing I can spot is too many [ and ]. Instead of:

           REFind("[^[[:Space:]]]+[[:Space:]]+[^[[:Space:]]]"

try

           REFind("[^[:Space:]]+[[:Space:]]+[^[:Space:]]"

See if that does it, god knows if I'm right.

Ade


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: 11 June 2003 14:14
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] js -> cf regex


Trying to port a simple Javascript regular expression to Coldfusion:

JS: if (form.EmailAddress.value.search(/[^\s]+\s+[^\s]/) != -1)

CF: <cfif REFind("[^[[:Space:]]]+[[:Space:]]+[^[[:Space:]]]",
Form.EmailAddress)>

Basically, it's looking for any number of  characters that aren't a space
character, followed by a space, followed by any character that's not a
space.  I've obviously not done it correctly, as CF Server politely tells
me it's a Bad Regular Expression.  I think I've messed it up with the ^
symbols, but couldn't figure how to do it.  Any ideas?


Duncan Cumming
IT Manager

http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from:
http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]






-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to