I"m trying to grab the current URL, and find a page number at the end. The URL is like the following:
http://www.domain.com/sub/name/anothername/page2/
http://www.domain.com/sub/name/anothername/page3/
http://www.domain.com/sub/name/anothername/page4/
I'm trying to set the page number to a var. I tried this, but the .* takes out the page# too.
$current_url = $ENV{REQUEST_URI}; $current_url =~ s/\/sub-dir\/name/.*\///;
I'm trying to end up with the page number only.
Thanks,
In reply to Stripping part of URL by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |