#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)[^.]+\.(?=[^.]+$)"
Local $sString = "// hash starts with number" & @CRLF & _
"/css/app.style.7fef363d5a8c4ef2458c.css" & @CRLF & _
"/css/app.bundle.7fef363d5a8c4ef2458c.css" & @CRLF & _
"/css/app.chunk.7fef363d5a8c4ef2458c.css" & @CRLF & _
"/css/app.7fef363d5a8c4ef2458c.css" & @CRLF & _
"/css/loading-animation.7fef363d5a8c4ef2458c.css" & @CRLF & _
"" & @CRLF & _
"// hash starts with letter" & @CRLF & _
"/css/app.style.b3bcb606396f0c96623a.css" & @CRLF & _
"/css/app.bundle.b3bcb606396f0c96623a.css" & @CRLF & _
"/css/app.chunk.b3bcb606396f0c96623a.css" & @CRLF & _
"/css/app.b3bcb606396f0c96623a.css" & @CRLF & _
"" & @CRLF & _
"// no preceeding dot separated name before the hash" & @CRLF & _
"/css/loading-animation.b3bcb606396f0c96623a.css" & @CRLF & _
"/css/app.b3bcb606396f0c96623a.js"
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