#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\d+%[^.](?:(?!original\b)[^\d\r\n])*\bpercentage\b"
Local $sString = "In some cases, 10% of the sales starts with the original percentage --> my regex match with this string but I don't want to because it contains the word "original"" & @CRLF & _
"" & @CRLF & _
"The 10% of the sales starts with a certain percentage --> my regex match with this string, it's okay because it doesn't containt the word "original"" & @CRLF & _
"" & @CRLF & _
"The 10% of the original" & @CRLF & _
"percentage of the sale is higher--> my regex doesn't match with this string, and it's okay because it containts the word "original" (maybe because the new line starts with percentage?)" & @CRLF & _
"" & @CRLF & _
"The 10% of the original sale" & @CRLF & _
"is the percentage of that --> my regex match with this string but I don't want to because it contains the word "original"" & @CRLF & _
"" & @CRLF & _
"10% "whatever" percentage" & @CRLF & _
"" & @CRLF & _
"10% original percentage"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; 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