#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)([A-Z0-9])(?:([A-Z0-9\.\-\s]*)*\:+)"
Local $sString = "MR. SMITH:" & @CRLF & _
"- CAPTAIN AMERICA:" & @CRLF & _
"ANT-MAN:" & @CRLF & _
"2014 NEBULA:" & @CRLF & _
"-2012 IRON MAN:" & @CRLF & _
"BOY 1:" & @CRLF & _
"" & @CRLF & _
"1" & @CRLF & _
"00:00:07,174 --> 00:00:09,837" & @CRLF & _
"BARTON: Okay, hold on." & @CRLF & _
"" & @CRLF & _
"16" & @CRLF & _
"00:00:36,411 --> 00:00:37,527" & @CRLF & _
"- COOPER: Nice!" & @CRLF & _
"- LAURA: Nice throw, kiddo." & @CRLF & _
""
Local $sSubst = "\<font color\=\"\#FFA500\"\>\<b\>$0\<\/b\>\<\/font\>"
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