i need to remove the next word of search string.. i have search array like array(‘aa’,’bb’,’é’);
This is my paragraph ‘Hello, this is a test paragraph aa 123 test bb 456’.
In this paragraph i need to remove 123 and 456.
$pattern = "/\bé\b/i";
$check_string = preg_match($pattern,'Hello, this is a test paragraph aa 123 test é 456');
How to get the next word?? Please help.
Here’s my solution:
You replace “SEARCH_WORD NEXT_WORD” with “SEARCH_WORD”, thus eliminating “NEXT_WORD”.