$re = '/^(\+){0,1}254(110|111|112|113|114|115|116|117|118|119|701|700|702|703|704|705|706|707|708|709|710|711|712|713|714|715|716|717|718|719|720|721|722|723|724|725|726|727|728|729|740|741|742|743|745|746|748|757|758|759|767|768|769|790|791|792|793|794|795|796|797|798|799)(\d{6})$/m';
$str = '';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php