title: Regex match especific characters between 2 strings
body: <p>I have this json inside an appender:</p>
  
  <pre><code>{"message": "This is a "bad-json" message" "severity": "INFO"}
  </code></pre>
  
  <p>I need to match every double quotes inside the message to replace them with single quotes, leaving the other double quotes as they are, like this:</p>
  
  <pre><code>{"message": "This is a 'bad-json' message" "severity": "INFO"}
  </code></pre>
  
  <p>So I have a regex with positive look ahead and positive look behind:</p>
  
  <pre><code>(?&lt;="message": ")(.*)(?=","severity")
  </code></pre>
  
  <p>But I don't know how to get only the quotes inside to do the replacement, I tried changing the <code>(.*)</code> part but it seems like is all or nothing and I haven't been able to capture only the double quotes.</p>
  
  <p>Here's an example: <a href="https://regexr.com/4g0oc" rel="nofollow noreferrer">RegexR</a></p>
  
  <p>I've been looking at other answers but most of them whant all the characters I found this one <a href="https://stackoverflow.com/questions/51010366/regex-match-digits-between-strings">Regex match</a> but still not good enough.</p>
  
  <p>EDIT:</p>
  
  <p>Here are more samples:</p>
  
  <pre><code>{"message": "This is a "bad-json" message with "bad json" quotes","severity": "INFO"}
  {"message": ""bad-json" message at start and end "bad json"","severity": "INFO"}
  {"message": "many "bad-json" "bad-json" "bad-json", "bad-json" "bad-json" messages all over the place","severity": "INFO"}
  </code></pre>