title: Regex Pattern to Match Character Not Surrounded by Particular Characters
body: <p>I'm trying to use a regular expression to match a certain character only when it isn't immediately adjacent to a certain character. (For an eBook in Calibre)</p>
  
  <p>Specifically, I want to match all <code>”</code> that aren't at the end of a sentence, which means they will be between regular characters, not an angle bracket or space. I thought <code>”[^&lt;]</code> would work, but that selects both the quotation mark and the next character, not just the character itself. I'm also not sure how to do an OR to check for a space. I'm assuming it would be something like <code>”[^&lt;]|[^ ]</code> but that's not right either.</p>
  
  <p>Here's an example of what I would like to match:</p>
  
  <p>Beside angle bracket:
  <code>&lt;p class="calibre1"&gt;“I”m tired!”&lt;/p&gt;</code></p>
  
  <p>Beside space: <code>&lt;p class="calibre1"&gt;“I”m tired!” he said&lt;/p&gt;</code></p>
  
  <p>Only the quotation mark within <code>I”m</code> should be selected (and only the quotation mark itself)</p>
  
  <p>I'm sorry if there's an obvious answer for this, but I've been reading over Python's regex documentation and I can't figure it out. :(</p>