So I'm new to regex and trying to write a regex that will match this:
example.com/some-url-text-here/
but not something like
example.com/some-url-text/but-also-more-than-two-slashes/
example.com/text-here/one-slash-too-many/two-slashes-too-many/
Basically, I would like it to match a url that has some string-separated-by-dashes
surrounded by no more than two /
's.
I tried a couple of different things like negative look around or not.... last thing I tried was this:
example\.com/[a-zA-z]*-*/
[a-zA-z]*-*
matches something like text-here
, but I can't get it to match /text-here/
.. what am I doing wrong in this case?