Match for a word in a text with the PHP script

Gabriel Turqos

Active Member
Joined
Mar 11, 2019
Messages
17
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?
 

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,998
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