title: Need to know what this regex does, is it safe?
body: <p>Updating someone else's old PHP project and I'm unfamiliar with regular expressions.</p>
  
  <p>Question one is: What does this do?</p>
  
  <pre><code>preg_match('/^[0-9]+[.]?[0-9]*$/', $variable)
  </code></pre>
  
  <p>Question two is: Is this a safe filter for insertion into a mysql DB without mysql_real_escape_string()? I know the answer is prob no, but it is set up to use mysql_real_escape_string() only if this regex doesn't pass.</p>
  
  <p>Thanks.</p>