I'm trying to use this regular expression, but I'm having trouble testing it, because for whatever reason it is crashing the only two regex testers I use.
^([a-zA-Z-]+/?)+$
If I'm not mistaken, that should match any URI that follows this format:
some-uri-string/some-uri-string/some-uri-string
However, I don't want it to match:
some-uri-string/some-uri-string//some-uri-string
Notice the double slash. Essentially, it is category/sub-category/sub-sub-category/page
With any number of sub-categories being allowed.