Mega Code Archive

 
Categories / Python Tutorial / Regular Expressions
 

Dig out path

import re match = re.match('/(.*)/(.*)/(.*)', '/usr/home/joe') print match.groups(  )