- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$re = '/\b[Aa]ny\b/';
$str = 'Will *any* company do *any* job, (are there any)?';
if(preg_match_all($re, $str, $matches)){
}
// Print the entire match result
var_dump($matches);