public function __construct(array $regexToToken, $additionalModifiers = 'i')
{
$this->regexToToken = array();
foreach ($regexToToken as $regex => $token) {
$regex = '~' . str_replace('~', '\\~', $regex) . '~A' . $additionalModifiers;
$this->regexToToken[$regex] = $token;
}
}