3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $toks = [ '(?=\D*\d)', '\b(waiting)\b', '^(\w+)', '\b(response)\b', '\b(from)\b', '\|', '\b(to)\b', ]; $patterns_flattened = implode('|', $toks); if (preg_match_all("/$patterns_flattened/i", "I'm waiting for a response from", $matches)) { print_r($matches[0]); }
Output for 5.6.38 - 7.3.0rc3
Array ( [0] => I [1] => waiting [2] => response [3] => from )