http://www.perlmonks.org?node_id=908379


in reply to Regex to get everything before first /

See also: My Favourite Regex Tools

HTH,

planetscape