title: A Way To Merge Differences Between Two Strings?
body: <p>I've created a wordpress plugin which automatically adds a <code>&lt;!--more--&gt;</code> tag to your post based on certain criteria, but intelligently places this tag inside your post. The problem is, I haven't come up with a proper way to battle HTML code. Currently I have it checking to see if there is a <code>&lt;</code>, and if so, it finds the next <code>&gt;</code> in the post.</p>
  
  <p>What I'm hoping to do here is remove the html from the equation entirely. I was wondering if there is any system, like a git for PHP, where I would be able to save the HTML code version of the string, and then strip the HTML away and store the plaintext version of the code in another variable, place the <code>&lt;!--more--&gt;</code> tag into the plaintext version of the code, and then compare the two versions to properly merge the HTML code back into the plaintext.</p>
  
  <p>I've tried Google, I've done about 100 hours of code changes, and I've still not come up with a solution. So now I'm bowing to the power of the cloud. Is there anyone here that can come up with a solution?</p>