Use preg_match_all when checking node contents