#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)(?<=\bthickness(?:\s{1,10}(?!(?:after|myectomy|resection)\b)[a-zA-Z]{1,100}){0,8}\s{0,10}[:=(]?)\d{1,3}(?:\.\d{1,3})?"
Local $sString = "maximum size of thickness in base to mid of anteroseptal wall(1.7cm) " & @CRLF & _
"(anterolateral and inferoseptal wall thickness:1.6cm) " & @CRLF & _
"hypertrophy in apical segments maximom thickness=1.6cm with sparing of posterior wall" & @CRLF & _
"septal thickness=1cm " & @CRLF & _
"LV apical segments with maximal thickness 1.7 cm and dynamic " & @CRLF & _
"septal thickness after myectomy=1cm "
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