#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "^(?!Andrea)(?:[\S\s](?!Andrea))*+$"
Local $sString = "Example for Stack Overflow:" & @CRLF & _
"http://stackoverflow.com/questions/164414/how-to-inverse-match-with-regex" & @CRLF & _
"http://stackoverflow.com/a/38846455/1188377" & @CRLF & _
"" & @CRLF & _
"This test string is NOT a match because it contains the text "Andrea". If it didn't contain that word, it would be a match." & @CRLF & _
"" & @CRLF & _
"For a variety of test cases, click the "Unit Tests" button on the left side of the page. It looks like a checkmark. Then, click the "play" icon above the test list."
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm