fork download
  1. import re
  2. p = re.compile(r'@\w*handle\w*')
  3. test_str = "@handle what is your problem?\nwhat is your problem @handle?\n@123handle what is your problem @handle123?\n"
  4. print(p.findall(test_str))
Success #stdin #stdout 0.01s 9016KB
stdin
Standard input is empty
stdout
['@handle', '@handle', '@123handle', '@handle123']