fork(11) download
  1. import re
  2. strn = "word hereword word, there word"
  3. search = "word"
  4. print re.findall(r"\b" + search + r"\b", strn)
Success #stdin #stdout 0.01s 7736KB
stdin
Standard input is empty
stdout
['word', 'word', 'word']