How can one strip the left parts and right parts off strings up to a matching expression as in ksh?
For instance:
${name##*/}
${name%/*}
(see http://www.well.ox.ac.uk/~johnb/comp/unix/ksh.html for ksh examples).
I can't seem to figure out a simple way of doing this using re module or string module but I must be missing something.