fork download
  1. import re
  2.  
  3. pattern = r"UsingDirectiveDecl\s0x[a-f0-9]{7}\s+<simple\.cpp:[0-9]+:[0-9]+,\s[a-zA-Z]+:[0-9]+>\s[a-zA-Z]+:[0-9]+\sNamespace\s0x[a-f0-9]{7}\s'[^']*'"
  4.  
  5. s = ("test | |-UsingDirectiveDecl 0x16de688 <line:58:3, col:24> col:24 Namespace 0x16de588 '__debug' test\n"
  6. "test |-UsingDirectiveDecl 0x1e840b8 <simple.cpp:2:1, col:17> col:17 Namespace 0x1378e98 'std' test")
  7.  
  8. print(re.findall(pattern, s))
Success #stdin #stdout 0.03s 9628KB
stdin
Standard input is empty
stdout
["UsingDirectiveDecl 0x1e840b8 <simple.cpp:2:1, col:17> col:17 Namespace 0x1378e98 'std'"]