EasyRegex Logo
EasyRegex
Neu

Find Whole Words in PHP

PHP

Regulärer Ausdruck

/	+/
Kopieren
Haben Sie Feedback?

Erklärung

This regex pattern uses the \b metacharacter to match the boundary between a word character and a non-word character. By using \b at the beginning and end of the pattern, it ensures that the match is a whole word.

PHP

Beispielverwendung

preg_match_all('/\b\w+\b/', $text, $matches);
Kopieren

Ähnliche Reguläre Ausdrücke