tags:

views:

89

answers:

2

I want a regrex for URl like this --

http://stackoverflow.com/ with allows only backslash in the end

Thanks

+1  A: 

^http(s)?://[^\\]+\\$

This is very, very, very general. So it lets the parts between http and the backslash at the end let whatever they want. If you wnat further matching there you have to specify what to match.

ApoY2k
You don’t need to group the single `s`.
Gumbo
A: 

Hi, I am facing this problem. "^http(s)?://[^\]+\$" its not working.

Mohit Kumar