Match for a word in a text with the PHP script

Gabriel Turqos

Active Member
I have an applications developed with PHP. I have a big text file where I want to match for a word but this can be change in the feature. How can I match a word in PHP?
 
Use regex
such as
\b(?i)word\b would match the word 'word' and ignore case and the \b's are word boundaries.
 
Back
Top