c# - Regex modification -
i absolutely stupid when comes regex. have been trying modify following expression match urls begin www. matches urls begin http, ftp, , https not plain www. have not had success on own. appreciated.
regex.ismatch(text, @"(^(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)")
thanks in advance!
make this...
(http|ftp|https):\/\/
into this...
((http|ftp|https):\/\/|www\.)
Comments
Post a Comment