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
  • 741,623
  • 53
  • 500
  • 612
md123
  • 295
  • 3
  • 8

0 Answers0