string matches given regex pattern in php code example Example: php preg match space or start of string /\b(stackoverflow)\b/