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

I did a couple of tests with parens in and around parameter values, and it 
worked for me.

(in a regex, the backslash means 'match the following literal character').

....
> Seemed to be working great, but the problem is that the regex excludes 
> 
> '(' and ')' signs, which are used in some of these URL's. How would I 
> 
> adjust the regex to no longer exclude these two characters?
> 
> <cfscript>
> /**
  
> * A quick way to test if a string is a URL
  
> *
  
> * @param stringToCheck         The string to check.
  
> * @return Returns a boolean.
  
> * @author Nathan Dintenfass ([EMAIL PROTECTED])
  
> * @version 1, November 22, 2001
  
> */
> function isURL(stringToCheck){
>               return 
> REFindNoCase("^(((https?:|ftp:|gopher:)\/\/))[-[:alnum:]\?%,\.
> \/&##!@:=\+~_]+[A-Za-z0-9\/]$",stringToCheck) 
> NEQ 0;
>       }
> </cfscript>
> 
> TIA to anyone and everyone who can help me with a solution to this 
> issue.
> -- 
> Steve "Cutter" Blades
> Adobe Certified Professional
> Advanced Macromedia ColdFusion MX 7 Developer
> _____________________________
> http://blog.cutterscrossing.
com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278773
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to