Good day! How to create a regular expression to ignore a string if it contains the word word?

  • Please give the test case. And tell me what you mean by the word "string"? - Opalosolo
  • there is a multi-line text, you need to ignore the search string, if it has the word word. - woland

1 answer 1

You read each line in a loop into a variable, then you try on checking for occurrences of a word on a regular basis (for example, using preg_match), and discard the word if you find it or save it if there is no word.

  • I guessed that; I thought maybe you can regular. - woland