#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)(?<!\d|^)(?<!(?<![^\W_])(?:sha|md))(?=\d)|(?<=\d)(?!\d|$)|_"
Local $sString = "Aisha256" & @CRLF & _
"ai_sha256" & @CRLF & _
"test123" & @CRLF & _
"84test" & @CRLF & _
"test md5" & @CRLF & _
"sha256" & @CRLF & _
"word two sha1" & @CRLF & _
"w0rd" & @CRLF & _
"test_md5" & @CRLF & _
"sha256" & @CRLF & _
"md5"
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