#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "[0-9][^.](januar($| |\n)|februar($| |\n)|mars($| |\n)|april($| |\n)|mai($| |\n)|juni($| |\n)|juli($| |\n)|august($| |\n)|september($| |\n)|oktober($| |\n)|november($| |\n)|desember($| |\n))"
Local $sString = "15. januar" & @CRLF & _
"15 januar" & @CRLF & _
"" & @CRLF & _
"24. februar spiste jeg en katt." & @CRLF & _
"24 februar spiste jeg en katt."
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