title: Phrasal template detection
body: <p>Is there an easy way to detect a phrasal template in a block of text?</p>
  
  <p>For example, given the text:</p>
  
  <blockquote>
    <p>Not sure how to approach this. It's very difficult, and by difficult I mean I don't know how to do it. But maybe it's obvious for someone else?</p>
  </blockquote>
  
  <p>And the template:</p>
  
  <blockquote>
    <p>[x], and by [x] I mean [Y]</p>
  </blockquote>
  
  <p>Would result in a match.</p>
  
  <p>I would assume that regex of some description would be the best bet, although I don't know if such a thing is possible with regex.</p>
  
  <p>Bonus: what would be the most computationally efficient approach, if trying to match many templates in succession?</p>
  
  <p>Edit: Just to clarify, I just need an exact match. For example the above template would <em>not</em> have to match the following:</p>
  
  <blockquote>
    <p>apple, and by apple I do mean pear</p>
  </blockquote>