<?php $text = "Ты думал что познал"; preg_match_all('/(\w+\sчто)(?:.*?\s)(\w+\sа\s)/u', $text, $matches); var_dump($matches);
Standard input is empty
array(3) { [0]=> array(0) { } [1]=> array(0) { } [2]=> array(0) { } }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!