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

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -