I want to know what's the meaning of tilde operator in regular expressions.

I have this statement:

```
if (!preg_match('~^\d{10}$~', $_POST['isbn'])) {
    $warnings[] = 'ISBN should be 10 digits';
}

```

I found this document explaining what tilde means: [`~`](http://en.allexperts.com/q/Perl-CGI-1045/2008/9/perl-Regular-Expression-usage.htm)

It said that `=~` is a perl operator that means run this variable against this regular expression.

But why does my regular expression contains two tilde operators?