title: Regex remove json property
body: <p>I'd like to remove a stringfied json's property based on its key wherever it is, whatever its value type is. But removing it only if its value is a string and its on the root level of the object would be nice for a beggining. I tried this:</p>
  
  <pre><code>[,]{1}[\s]*?\"attrName\"[ ]*?[:][ ]*?\".*\"[^,]|\"attrName\"[ ]*?[:][ ]*?\".*\"[,]{0,1}
  </code></pre>
  
  <p>Example : <a href="https://regex101.com/r/PAlqYi/1" rel="nofollow noreferrer">https://regex101.com/r/PAlqYi/1</a></p>
  
  <p>but it looks a lot big to do such a simple job, what it does is ensure the comma will be removed as well, if attrName is the first attribute, the last ot something in the middle of the json three. Does anyone has a better idea to make this regex more readable?</p>