Hi, I'm having trouble developing a regex that will validate a proper URL for a specific site.  It should allow text,number,underscores seperated by /'s and prepended with a specific URL.  I'm trying to use it on a cfinput pattern attribute. I'm stumbling over how do deal with these acceptable possibilities:

www.mywebsite.com/dir1/dir2/dir4/

www.mywebsite.com/dir1/dir3/default(.cfm|.htm)

but this is not ok:

www.mywebsite.com/dir1/dir1

cfinput validate="regular_expression" pattern="^[(http://)(www.|www2.)(mywebsite.com/)([a-zA-Z_0-9]$"

Thanks in advance,

Morgan
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to