title: PHP Regex - How to append to a URL (in a string variable with a lot of text) where there is an <a href>
body: <p>I am working on an automation for building Landingpages.</p>
  
  <p>A copy/pastes from a word doc to a TinyMCE textarea which creates the  in the output. </p>
  
  <p>so if I copy/paste something like this: </p>
  
  <blockquote>
    <p>This is my <a href="http://www.google.com" rel="nofollow">Website</a>.</p>
  </blockquote>
  
  <p>from a word doc - the output of it after sending the form will look like this: </p>
  
  <pre><code>This is my &lt;a href="http://www.google.com"&gt;Website&lt;/a&gt;.
  </code></pre>
  
  <p>I want to append to every link within an <code>&lt;a href&gt;</code> tag (<strong>only within an <code>&lt;a href&gt;</code> tag!</strong>) something like this: </p>
  
  <blockquote>
    <p>?utm=foo_foo_foo</p>
  </blockquote>
  
  <p>so it will look like this: </p>
  
  <pre><code>This is my &lt;a href="http://www.google.com?utm=foo_foo_foo"&gt;Website&lt;/a&gt;.
  </code></pre>
  
  <p>P.S: urls can end with "/" or without, this shouldn't matter, but should work both ways. </p>
  
  <p>P.S2: TinyMCR adds the  tags by itself (if you haven't noticed me mentioning it..,). I just need to append to a string that looks like this: </p>
  
  <pre><code>$string = "This is my &lt;a href="http://www.google.com"&gt;Website&lt;/a&gt;.";
  </code></pre>