Also, just what does that caret (circumflex?) do in the below conditions?! If I run the script as show below, I get all 9 lines returned in %myVar%. But if I remove the caret, then only lines 1-7 are returned... Strange--yes?
Code: Select all
#NoEnv ; For security
#SingleInstance force
#Persistent
Haystack =
(
[1 PWN Consent for Initial EVAL]
[2 PWN Consent for Initial EVAL-Opts]
[3 PWN--Transfer]
[4 PWN--Transfer-Opts]
[5 PWN Need to do TRIennial REEVAL]
[6 PWN Need to do TRIennial REEVAL-Opts]
[7 PWN EARLY REEVAL REMOVE areas]
[8 PWN MDR -- NOT manifestation]
[9 PWN MDR -- IS manifestation]
)
Needle := "m)\[\N+[^-Opts]\]"
RegExMatch(Haystack, Needle, myVar)
MsgBox Found:`n`n %myVar%
return