title: How to keep certain characters intact while using preg_replace?
body: <p>Working on some text formatting and analysis - I've got a large block of text that I'm trying to break into individual sentences. Obviously, <code>explode</code> can do this handily using the punctuation at the end of each sentence.</p>
  
  <p>The problem I'm having is that normal language also contains periods that don't indicate the end of a sentence - such as decimals and abbreviations. For example, "One team anticipates they will break the previous record of 92.49% efficiency, which was set in 1991." will result in two sentences, the second starting with "49%". This is what I'm trying to avoid.</p>
  
  <p>I can safely remove these mid-sentence periods without affecting my analysis, but I need to keep the rest of each string intact - and this is where I'm running into trouble. In the case of the decimal point above, I can match the character with <code>$str = preg_replace("/[\.]+[0-9]/", "", $str);</code> - but replacing the match also eliminates the first decimal of the number.</p>
  
  <p>How can I use <code>preg_replace</code> and still keep certain characters intact?</p>
  
  <hr>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>A couple answers have suggested using a lookahead to match a character without including it in the replacement. While this works for the example given above, this wouldn't work for an abbreviation (eg U.S.) - is there a more general case we can come up with, or at least maybe a counterpart "lookbehind"?</p>