Pastebin

Paste #1542: regex example

< previous paste - next paste>

Pasted by chrivers

Download View as text

if match(reg1, line):
  foo, bar = M.groups()
elif match(reg2, line):
  ..
elif match(reg3, line):
  ..
else:
  ..

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.