in reply to Fetching last part of url

Your trying to make it too complicated. Just make use of the greedy nature of matches and get all the way to the last '\' (no matter how many there are) like this:

myfetch =~ /.+\\(.+)/;

Also note that the $1 doesn't go in the match itself; you would use it later, perhaps by assigning it to a variable.

Update: added the first .+ to the regex

TheEnigma