Код: Выделить всё
$tt = 'This is a tomato test';
preg_match('/is(.*)to/', $tt, $match);
print_r($match);
Код: Выделить всё
Array
(
[0] => is is a tomato
[1] => is a toma
)
Подробнее здесь: https://stackoverflow.com/questions/500 ... rtial-word
Код: Выделить всё
$tt = 'This is a tomato test';
preg_match('/is(.*)to/', $tt, $match);
print_r($match);
Код: Выделить всё
Array
(
[0] => is is a tomato
[1] => is a toma
)