RegularExpression Validator (Regex) to check valid HTTP, HTTPS and FTP URLs in ASP.Net

EmadKhan
 
on Aug 18, 2015 08:40 AM
4779 Views

Hi ! this is my regular expression which i am using for url :

^((http|https|ftp)://)?(([\w-]+\.)+[^#?\s]+)(.*)?(#[\w\-]+)?$

Now it is allowing comma , i dont want to allow comma in it . Kindly help

Download FREE API for Word, Excel and PDF in ASP.Net: Download
EmadKhan
 
on Aug 18, 2015 08:48 AM

I found a solution for this :

^((http|https|ftp)://)?(([\w-]+\.)+[^,#?\s]+)([^,]*)?(#[\w-]+)?$