fork download
  1. import re
  2. line = " Name = Peppa Pig "
  3. match = [(x,y.strip()) for x,y in re.findall(r"(Name)\s*=(.+)", line)]
  4. print(match)
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
[('Name', 'Peppa Pig')]