fork download
  1. import re
  2. p = re.compile(ur'\b[0-9]{6}\b')
  3. test_str = ur"C:\\Users\\416938\\AppData\\Roaming\\ESRI\\Desktop10.0\\ArcCatalog"
  4. match = re.search(p, test_str)
  5. if match:
  6. print(match.group(0))
  7.  
Success #stdin #stdout 0.01s 9016KB
stdin
Standard input is empty
stdout
416938