title: Regular expression to replace all script src attributes
body: <p>I need to refactor existing Django code, by using <code>{% static 'path/to/file' %}</code> tag. I think it's possible to use PyCharm feature &quot;Replace in path&quot; with regex option.</p>
  <p>So, I need to replace my script tags, which now look like:</p>
  <pre class="lang-js prettyprint-override"><code>&lt;script type=&quot;text/javascript&quot; src=&quot;/static/js/script.js&quot;&gt;&lt;/script&gt;
  </code></pre>
  <p>To look like:</p>
  <pre class="lang-js prettyprint-override"><code>&lt;script type=&quot;text/javascript&quot; src=&quot;{% static 'js/script.js' %}&quot;&gt;&lt;/script&gt;
  </code></pre>
  <p>Here is PyCharm &quot;Replace in Path&quot; window:</p>
  <p><img src="https://i.stack.imgur.com/JpLl1.png" alt="enter image description here" /></p>
  <p>I think I should pass in &quot;Text to find&quot; something like <code>src=&quot;([^&quot;]+)&quot;</code>, but what should I pass in &quot;Replace with&quot;, I can't understand.</p>