I wanted to know what is the pythonic function for this :
I want to remove everything before the wa path.
wa
p = path.split(\'/\') counter
import re path = '/book/html/wa/foo/bar/' m = re.match(r'.*(/wa/[a-z/]+)',path) print m.group(1)