I am looking for one regex to match the following 4 cases (capturing an identifier so that I can rewrite the urls)
http://localhost/gallery/test-name/123456 http://localhost/gallery/test-name/123456/ http://localhost/gallery/test-name/123456/video-name/159 http://localhost/gallery/test-name/123456/video-name/159/
The current Regex is lower, but in all cases it does not capture identifiers. Do all experts know what I'm doing wrong?
^(.*)/gallery/(.*)/([0-9]{1,15})(/)?((.*)/([0-9]{1,15})(/)?)?
source share