fork download
  1. import re
  2. if re.fullmatch(r'[0-9][*+/xX-][0-9]', '5+5'):
  3. print('5+5 string found!')
  4. if re.fullmatch(r'[0-9][*+/xX-][0-9]', '5+56'):
  5. print('5+56 string found!')
Success #stdin #stdout 0.02s 28384KB
stdin
Standard input is empty
stdout
5+5 string found!