#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)^[^\t](.*?)(?=\t)"
Local $sString = "[ 0-9 ] 1984" & @CRLF & _
" 2 mothers in a h d b playground" & @CRLF & _
" 2001: A Space Odyssey" & @CRLF & _
" 42nd Street" & @CRLF & _
" 4-H" & @CRLF & _
" 50 Cent" & @CRLF & _
" 60 Minutes" & @CRLF & _
"A A" & @CRLF & _
" A" & @CRLF & _
" A 1" & @CRLF & _
" A cappella" & @CRLF & _
" A.D." & @CRLF & _
""
Local $sSubst = "<div id="abc-box"><a name="$1">$1</a></div>"
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