Я пытаюсь получить матч из этой строкиRegular Expression, чтобы соответствовать коснуться, который начинается с
"Dial [Toll Free 1800 102 8880 ext: 246] to connect to the restaurant. <a class='tooltip' title='Foodiebay has now introduced value added calling features through the website. You just need to dial this number and we ..."
Где я хочу, чтобы проверить, является ли переменная начинается со строки набора
$a = 'Dial [Toll Free 1800 102 8880 ext: 246] to connect to the restaurant. <a class='tooltip' title='Foodiebay has now introduced value added calling features through the website. You just need to dial this number and we';
preg_match('/[^Dial]/', $a, $matches);
Не будет substr ($ a, 0,4) == 'Dial' будет быстрее, если он не существует в строке (и строка очень длинная)? – 2010-11-28 03:57:17