0
(?<!egg[\n*\s*])(yolk)
eggyolk  #pass
egg yolk   #notpass
egg                                   yolk #pass

How I can make sure the third string does not get passed as I made sure it looked behind multiple whitespace characters and new-lines.

Barmar
  • 669,327
  • 51
  • 454
  • 560
md123
  • 295
  • 2
  • 7

0 Answers0