The sed extraction example is more complicated than it needs to be:
echo "sample with /path/" | sed -E 's|.*(/.*/)|\1|g'
The search/replace separator doesn't have to be '/'.I can't see myself using this for a performance bump given that I already know vi, thus sed expressions.