> Has anyone converted this to work with _javascript_?

> This is the Regex from the isURL() UDF from cflib. I use
> the isURL on
> the server side and wanted to add something similar on the
> slient side
> but keep fialing to convert it correctly.

> ^(((https?:|ftp:|gopher:)\/\/))[-[:alnum:]\?%,\.\/&##!@:=\
> +~_]+[A-Za-z0-
> 9\/]$

> Thanks!

Odd that is uses alnum in one place and A-Za-z0-9 in another...
offhand I don't see why this wouldn't work if you use a RegExp object
and maybe replace the [:alnum:] class with \w ...

var rex = new RegExp("^(((https?:|ftp:|gopher:)\/\/))[-\w\?%,\.\/&#!@:
=\+~_]+[A-Za-z0-9\/]$");

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to