fork download
  1. import re
  2. rx = r"\bfind\s.*-exec\s.*\\;?[^;]*"
  3. text = r"lsg <name>; cd <name>;find . -type f -exec grep -i <name> {} \; -print;lsg ; ps axwwl "
  4. match = re.search(rx, text)
  5. if match:
  6. print (match.group())
Success #stdin #stdout 0.03s 9516KB
stdin
Standard input is empty
stdout
find . -type f -exec grep -i <name> {} \; -print