title: Emacs regex wordWord boundary (specifically concerning underscores)
body: <p>I am trying to replace all occurrences of a whole word on emacs (say foo) using M-x replace-regexp.</p>
  
  <p>The problem is that I don't want to replace occurrences of foo in underscored words such as word_foo_word</p>
  
  <p>If I use \bfoo\b to match foo then it will match the underscored strings; because as I understand emacs considers underscores to be part of word boundaries, which is different to other RegEx systems such as Perl.</p>
  
  <p>What would be the correct way to proceed?</p>