How can I use conditional regex as not true

I’m running into trouble to find the answer that how to negate the conditional with regex. Something like below:

  • debug: msg=“{{ Hello World}}”
    when:- test.rc !=0

  • test.stderr | find (‘(No Such File or Directory)’)

  • debug: msg=“{{ Hello Friend}}”
    when:

  • test.rc !=0

  • <would like to use negate of “test.stderr | find (‘(No Such File or Directory)’)”>

Looking for the expert help on this !

Thanks

  • rest.rc != 0
  • ‘No Such File or Directory’ not in test.stderr

Thanks will try!!