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]

Reply via email to