#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^\s*(?:(?:\S\s?)*\s+){2}| +(?= )"
Local $sString = " 0 4D1F 8172 DC.L $4D1F8172 ; Rom CheckSum" & @CRLF & _
" 4 0040 002A DC.L $0040002A ; Boot Vector = EBootStart" & @CRLF & _
" 8 00 DC.B $00 ; Machine Type" & @CRLF & _
" 9 75 DC.B $75 ; Rom Version" & @CRLF & _
" A 6000 0056 Bra L3" & @CRLF & _
" E 6000 0750 Bra L62" & @CRLF & _
" 12 6000 0044 Bra L2" & @CRLF & _
" 16 6000 0016 Bra E_6" & @CRLF & _
" 1A 0001 76F8 DC.L $000176F8 ; offset of Resources in ROM" & @CRLF & _
" 1E 4EFA 2BFC Jmp P_mvDoEject" & @CRLF & _
" 22 0000 0000 DC.L $00000000" & @CRLF & _
" 26 0000 0000 DC.L $00000000" & @CRLF & _
" " & @CRLF & _
" 1FFE2 4B57 4B20 4C41 DC.B 'KWK LA'"
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