Shaitender Singh
Shaitender Singh

Reputation: 2217

Regex for URL with back slash in the end

I want a regex for URL like this --

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

Thanks

Upvotes: 0

Views: 2160

Answers (1)

F.P
F.P

Reputation: 17831

^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.

Upvotes: 2

Related Questions