title: Regex to match a string NOT surrounded by brackets
body: <p>I have to parse a text where <em>with</em> is a key word if it is not surrounded by square brackets. I have to match the keyword <em>with</em>. Also, there must be word boundaries on both side of <em>with</em>.</p>
  
  <p>Here are some examples where <em>with</em> is NOT a keyword:</p>
  
  <ul>
  <li>[with]</li>
  <li>[ with ]</li>
  <li>[sometext with sometext]</li>
  <li>[sometext with]</li>
  <li>[with sometext]</li>
  </ul>
  
  <p>Here are some examples where <em>with</em> IS keyword</p>
  
  <ul>
  <li>with</li>
  <li>] with</li>
  <li>hello with</li>
  <li>hello with world</li>
  <li>hello [ world] with hello</li>
  <li>hello [ world] with hello [world]</li>
  </ul>
  
  <p>Anyone to help?
  Thanks in advance.</p>