title: Regex - How to match everything apart from a particular symbol?
body: <p>I'm trying to write some regex to match everything apart from a symbol (well two symbols actually). I can get it working on regex101 but when written in PHP it doesn't seem to work correctly.</p>
  
  <p>I want to match anything other than say £ or $.</p>
  
  <p>I've tried this: <code>/[^£$]/g</code> but that only seems to match if the symbol is at the beginning of the string. I've tried so many combinations, tried escaping characters anchoring to the end which has worked a bit better but then it wouldn't catch something like this£inside.</p>
  
  <p>What am I doing wrong?</p>