title: Regex str_replace
body: <p>Would it be possible to incorporate a <code>str_replace</code> method with a regular expression, designed to catch url strings in a simple html &lt; textfield > input type?</p>
  
  <p>I'm considering something simple like a tip for the user to set it up as follows:</p>
  
  <p><em>This is some text and click this link <a href="http://www.google.com"><strong>here</strong></a>.</em></p>
  
  <p>Obviously the word "here" is a href to the url before it (or after it, if that makes a difference). The text input is drawn from a MySQL db.</p>
  
  <p>I believe the start of my solution is something along the lines of:</p>
  
  <pre><code>$regex = '';
  $pg = $row['pg'];
  $pg = str_replace('{regex goes here}', $pg);
  </code></pre>
  
  <p>But I know things are missing. 
  And then I would just output the $pg paragraph.</p>