Regex to Find URLs with only one slash -
i testing website , need target pages want include in test regex.
i targeting product pages have 1 slash in url (the urls not show http:// in them).
here urls need match:
the ones want www.mysite.com/just-on-slash
the ones don't want this: www.mysite.com/more-than-one/slash www.mysite.com
this should work case: ^[^/]+/?[^/]+$
for answer generic, trailing slash need /?
@ end, this: ^[^/]+/?[^/]+/?$
Comments
Post a Comment