in reply to remove the part of the string that is after the second to last '/'

$var =~ s![^/]*/$!!;

Have fun! :-)

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

  • Comment on Re: remove the part of the string that is after the second to last '/'
  • Download Code