I have following test strings:
- http://example.com/?foo=bar&path=a/b/c.png/&bar=foo
- http://example.com/?foo=bar&path=a/b/c.png&bar=foo
- http://example.com/?foo=bar&path=a/b/c.png
- http://example.com/?foo=bar&path=a/b/c.png/
I'm looking for a regex that only matches path=a/b/c.png(the path query parameter without the trailing slash). The path query parameter can be in the beginning, middle or end of the row.
So far I have following regex path=[^#&]*:
You can see it here: https://regex101.com/r/v4DqDx/1/
Thanks for any help!
EDIT: To be more clear, the query parameter in row 1 and 4 with the trailing slash should not match.