fork(2) download
  1. import re
  2. rx = r"(?:\b|(?<=_))word(?=\b|_)"
  3. s = "some_word_here and a word there"
  4. print(re.findall(rx,s))
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
['word', 'word']