Module re, extract on string match

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sriram Rajan

    Module re, extract on string match

    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,strin g1)

    <Extract /folder3/folder4/folder5/file>

    Thanks,

    Sriram
Working...