Module re, extract on string match

Sriram Rajan sriramrajan at acm.org
Mon Aug 4 19:54:19 EDT 2008


I am wondering if I can use re.search to extract from a particular
location in a string.
Example:
 string1='/Users/sriram/folder1/folder2/folder3/folder4/folder5/file'
 re.search ('folder3,string1)

 <Extract /folder3/folder4/folder5/file>

Thanks,

Sriram



More information about the Python-list mailing list