I want to extract the path out of a URL and I want to use regex for it.
I'm using this regex:
^(?:https?:\/\/)?(?:[^@\n]+@)?(?:www\.)?([^:\n\?\=ֿ\#]+)
and one side effect that the last / is captured.
e.g. -
domain.com/home/ = domain.com/home/
domain.com/home?param=value = domain.com/home
how do I validate that the last character of a specific capture group is not /?
note - I know I can solve this with another regex match, but I assume it can be done with one.