InRegex Logo
InRegex
New

Find Whole Words in PHP

Explanation

This regex pattern uses the  metacharacter to match the boundary between a word character and a non-word character. It ensures that the matched word is a whole word and not just a part of a larger word.

PHP

Regular Expression

/	+/
Copy
Do you have Feedback?
PHP

Example Usage

preg_match_all('/	ext+/', $text, $matches);
Copy

Similar Regular Expressions