C# .NET - Regular expression help - Asked By abinav shankar on 01-Mar-12 12:56 AM

Hi

I have constructed the pattern for the url <a href="http://test1.sulekha.com/test/chennai-adyar_9>

and the pattern is

 /([a-zA-Z]+)-([0-9a-zA-Z-]+)_([0-9])/?$

but i have to mention /chennai-adyar_1 as the parameters but i need to modify it so that when i give chennai-adyar it should take it as /chennai-adyar_1 how to do it

hema latha replied to abinav shankar on 01-Mar-12 06:47 AM
hi
use this

^(((h|H?)(t|T?)(t|T?)(p|P?)(s|S?))\://)?(www.|[a-zA-Z0-9].)[a-zA-Z0-9\-\.]+\.[a-zA-Z]*$