#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?:^|\n)\d+\n[\d\:\,\s\->]+"
Local $sString = "1" & @CRLF & _
"00:00:00,000 --> 00:00:16,700" & @CRLF & _
"to use 2 languages." & @CRLF & _
"" & @CRLF & _
"2" & @CRLF & _
"00:00:16,700 --> 00:00:19,600" & @CRLF & _
"I was saying that we are going to use 2 languages" & @CRLF & _
"" & @CRLF & _
"3" & @CRLF & _
"00:00:19,600 --> 00:00:24,700" & @CRLF & _
"...I myself will continue to speak because of time"
Local $sSubst = "\n"
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