fork download
  1. import re
  2. pattern = 'b[eq|ne|lt|gt]'
  3. instruction = "beq"
  4. if re.match(pattern, instruction):
  5. print "yes, that instruction matches"
  6. else:
  7. print "that instruction does not match"
Success #stdin #stdout 0.01s 7896KB
stdin
Standard input is empty
stdout
yes, that instruction matches