Getting the value from url which is between the forward slashes. Like
http://localhost/test/manage-users/1230/
output: 1230
I also found some help full answers but they are not satisfy my case properly. Their url is hard coded i.e, their url cant change but in my case url change if user redirect from different pages.
Get the value of a URL after the last slash
Different url when user redirect from different pages.
http://localhost/test/manage-users/1230/?value=1230
http://localhost/test/manage-users/1230/
http://localhost/test/manage-users/1230/test1/?value=1230
So i want a regex
which full fill my all cases.