I need a regular expression which matches:
http://example.com/foo
http://example.com/foo/
http://example.com/foo/bar
but not:
http://example.com/foobar
Using http://example.com/foo/? matches the three types, but it matches /foobar too that I don’t want. What should I add to the regex to not match /foobar?
Try this one: