I'm trying to match all URIs (of some specific pattern) without their suffix. My regex works when the address actually has a suffix, but I want it to also match cases where the suffix is already gone.
Regex:
(.+recordings\/.+)(\/.*)$
Matches:
https://somewebsite.com/recordings/10680-2162-4cff-991a-446ecff1/play
https://somewebsite.com/somethingsomething/recordings/10680-2162-4cff-991a-446ecff1/somesuffix
I'm trying to match this case as well:
https://somewebsite.com/recordings/10680-2162-4cff-991a-446ecff1
I've been playing with this for a couple of hours but unfortunately my knowledge of regex is limited.
Regex experts out there please help