title: How to replace double quotes within a string with apostrophe (not the outer double quotes specifying it's a string)
body: <p>I have pipe delimited .txt files in Linux that contain strings within double quotes.</p>
  <p>Some of the strings will have a double quote instead of an apostrophoe.</p>
  <p>e.g. I&quot;m a string.</p>
  <p>This will be represented in the file within the pipes as &quot;I&quot;m a string&quot;</p>
  <p>I need to replace &quot;I&quot;m a string&quot; with &quot;I'm a string&quot;.</p>
  <p>How can I do that with sed or using Python/Jupyter?</p>
  <p>Examples</p>
  <pre><code>&quot;String&quot;|&quot;I&quot;m not a valid string&quot;|&quot;I'm a valid string&quot;
  </code></pre>
  <p>Based on the data requirements I don't need to worry about things like:</p>
  <ol>
  <li>Pipe within the double quotes e.g. &quot;Str|Srt&quot;|&quot;Str&quot;</li>
  <li>Mix of double and single quotes e.t. &quot;Str'|'Str&quot;</li>
  </ol>