regex end of line or space js code example Example: php preg match space or start of string /\b(stackoverflow)\b/