#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?mi)^.*?(?=\d*[a-z]\d*[a-z]|$)"
Local $sString = "1234 123423-34 b4 3-z a 234 This is a test" & @CRLF & _
"1234 123423-34 b4 3-z a 234This is a test" & @CRLF & _
"1234 123423-34 b4 3-z a "
Local $sSubst = ""
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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