title: Tilde operator in Regular expressions
body: <p>I want to know what's the meaning of tilde operator in regular expressions.</p>
  
  <p>I have this statement:</p>
  
  <pre><code>if (!preg_match('~^\d{10}$~', $_POST['isbn'])) {
      $warnings[] = 'ISBN should be 10 digits';
  }
  </code></pre>
  
  <p>I found this document explaining what tilde means: <a href="http://en.allexperts.com/q/Perl-CGI-1045/2008/9/perl-Regular-Expression-usage.htm" rel="noreferrer"><code>~</code></a></p>
  
  <p>It said that <code>=~</code> is a perl operator that means run this variable against this regular expression.</p>
  
  <p>But why does my regular expression contains two tilde operators?</p>