title: Regex to match a particular character within a pair of tags?
body: <p>For example this <code>&lt;([a-z][a-z0-9]*)\b[^&gt;]*&gt;(.*?)&lt;/\1&gt;</code>will match the whole line of text enclosed by any pair of tags. But how do I match some particular character from that line? For example, the straight single quotation mark or apostrophe ( ' )?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here are some examples:</p>
  
  <p>1) to match the single quotation mark or apostrophe ( ' )</p>
  
  <pre><code>&lt;p&gt;Lorem ipsum dolor sit amet, consectetu'r adipisicing elit.&lt;/p&gt;
  </code></pre>
  
  <p>2) to match the double quotation mark in the beginning of the word <em>adipisicing</em> (the word is just an example it could be any word or a single letter).</p>
  
  <pre><code>&lt;p&gt;Lorem ipsum dolor sit amet, consectetur "adipisicing" elit.&lt;/p&gt;
  </code></pre>
  
  <p>3) to match the double quotation mark in the end of the word <em>adipisicing</em> (the word is just an example it could be any word or a single letter).</p>
  
  <pre><code>&lt;p&gt;Lorem ipsum dolor sit amet, consectetur "adipisicing" elit.&lt;/p&gt;
  </code></pre>
  
  <p>The expression should not match anything outside any pair of tags. In the above examples it's a paragraph, but it could be anything: heading, span, font tags etc.</p>
  
  <p><strong>UPDATE#2</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link rel="stylesheet" type="text/css" href="styles.css" /&gt;
  
  &lt;span&gt;hello, the world's ugliest dog&lt;/span&gt;&lt;br&gt;
  
  &lt;span&gt;hello "world"&lt;/span&gt;&lt;br&gt;
  
  &lt;span&gt;hello 'world'&lt;/span&gt;
  
  &lt;p class="someclassname"&gt;
      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt "u" labore et dolore's magna aliqua.
  &lt;/p&gt;
  &lt;p class="someclassname"&gt;
      Lorem 'ipsum' dolor sit amet, consectetur's adipisicing elit, sed do eiusmod tempor "incididunt" ut labore et dolore magna aliqua.
  &lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>