3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( '911 (info) YES NO D 1236 UNKNOWN', '910 (no i) YES NO D 1236 NOTE', '909 (no i) YES NO D 1236 UNKNOWN', '742 (info) YES NO D 1236 NOTE', '741/741 (info) YES NO D 1236 NOTE', '740/740 (info) YES NO D 1236 UNKNOWN', 'john (no i) YES NO D 0 NOTE' ); preg_match_all('/^\w+(?=.*NOTE$)/m', implode("\n", $array), $matches); print_r($matches[0]);
Output for 4.3.0 - 7.1.0
Array ( [0] => 910 [1] => 742 [2] => 741 [3] => john )