title: PHP Regex to Find and replace all occurrences of a string that that starts and ends with certain characters
body: <p>I am a newbie when it comes to regex. I have a json string that includes timestamp, I would like to remove all the occurrences of the <code>date</code> field in the string.</p>
  
  <p>the beautified json string looks like this:</p>
  
  <pre><code>{
    "abc": 157,
    "efg": 1,
    "hij": "1",
    "klm": "0.00",
    "created_at": {
      "date": "2020-04-08 12:53:34.682759",
      "timezone_type": 3,
      "timezone": "UTC"
    },
    "updated_at": {
      "date": "2020-04-08 12:53:34.682759",
      "timezone_type": 3,
      "timezone": "UTC"
    }
  }
  </code></pre>
  
  <p>I want to remove the all the occurrences of the string that starts with <code>"date": "</code> and ends with <code>",</code></p>
  
  <p>so the output would look like the following:</p>
  
  <pre><code>{
    "abc": 157,
    "efg": 1,
    "hij": "1",
    "klm": "0.00",
    "created_at": {
      "timezone_type": 3,
      "timezone": "UTC"
    },
    "updated_at": {
      "timezone_type": 3,
      "timezone": "UTC"
    }
  }
  </code></pre>
  
  <p>I know <code>preg_match_all</code> can actually help find all matching occurrences, however, i found difficulties in building the pattern especially that my pattern includes commas and double quotes.</p>