title: How to make a regex to replace the value of a key in a json file
body: <p>I want to make a regex so I can do a "Search/Replace"
  over a json file with many object.
  Every object has a key named "resource"
  containing a URL.</p>
  
  <p>Take a look at these examples:</p>
  
  <pre><code>"resource":"http://www.img/qwer/123/image.jpg"
  
  "resource":"io.nl.info/221/elephant.gif"
  
  "resource":"simgur.com/icon.png"
  </code></pre>
  
  <p>I want to make a regex to replace the whole url with
  a string like this: <strong><em>img/filename.format</em></strong>.</p>
  
  <p>This way, the result would be:</p>
  
  <pre><code>"resource":"img/image.jpg"
  
  "resource":"img/elephant.gif"
  
  "resource":"img/icon.png"
  </code></pre>
  
  <p>I'm just starting with regular expressions and I'm 
  completely lost. I was thinking that one valid idea would
  be to write something starting with this pattern <em>"resource":"</em></p>
  
  <p>and ending with the last five characters. But I don't even know how to try
  that.</p>
  
  <p>How could I write the regular expression?</p>
  
  <p>Thanks in advance!</p>