I don't remember whether the '/' needs to be escaped with square brackets, but searching for the following should work:
Code:
sed -e 's/[^\/]*\///g'
Edit: The '*' makes the search string redundant. On my box, the following works fine:
Code:
$ echo /hostname_home/mymessages | sed -e 's/.*\///g'
mymessages
Couldn't you use basename instead? For example:
Code:
basename /hostname_home/mymessages