title: What is a regex to match a string NOT at the end of a line?
body: <p>The regex <code>/abc$/</code> will match an <code>abc</code> that does appear at the end of the line. How do I do the inverse?</p>
  
  <p>I want to match <code>abc</code> that isn't at the end of a line.</p>
  
  <p>Furthermore, I'm going to be using the regex to replace strings, so I want to capture only <code>abc</code>, not anything after the string, so <code>/abc.+$/</code> doesn't work, because it would replace not only <code>abc</code> but anything after <code>abc</code> too.</p>
  
  <p>What is the correct regex to use?</p>