I want to do something like:
echo "/1_one/2_two/3_three.xyz" | sed 's/[/].*$/$$$/'
except that I only want to replace "3_three.xyz" and not the whole string, which the above will do. I've tried:
and tried moving the "?" into different locations, and every permutation of that and parentheses as well. No luck.
How can I do this (with sed)?