#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)\s*[\n\r]+(?=\([BCD]\))"
Local $sString = "These questions refer to the audio file 001_TOEIC_part3.mp3" & @CRLF & _
"" & @CRLF & _
"1). Where is the conversation taking place?" & @CRLF & _
"" & @CRLF & _
"(A) In a church " & @CRLF & _
"" & @CRLF & _
"(B) In an office" & @CRLF & _
"" & @CRLF & _
"(C) In a classroom" & @CRLF & _
"" & @CRLF & _
"(D) In a park" & @CRLF & _
"" & @CRLF & _
"2). What problem does the woman have?" & @CRLF & _
"" & @CRLF & _
"(A) She will be late for work." & @CRLF & _
"" & @CRLF & _
"(B) She cannot make the meeting." & @CRLF & _
"" & @CRLF & _
"(C) She is struggling with her presentation." & @CRLF & _
"" & @CRLF & _
"(D) She worked late yesterday." & @CRLF & _
"" & @CRLF & _
"3). What does the man offer?" & @CRLF & _
"" & @CRLF & _
"(A) To help" & @CRLF & _
"" & @CRLF & _
"(B) To write her report" & @CRLF & _
"" & @CRLF & _
"(C) To get coffee" & @CRLF & _
"" & @CRLF & _
"(D) To make copies" & @CRLF & _
"" & @CRLF & _
"These questions refer to the audio file 002_TOEIC_part3.mp3" & @CRLF & _
"" & @CRLF & _
"1). What does the man plan to do?" & @CRLF & _
"" & @CRLF & _
"(A) Have a party" & @CRLF & _
"" & @CRLF & _
"(B) Buy office supplies" & @CRLF & _
"" & @CRLF & _
"(C) Take a vacation" & @CRLF & _
"" & @CRLF & _
"(D) Ask the woman out" & @CRLF & _
"" & @CRLF & _
"2). Why does the man call the woman?" & @CRLF & _
"" & @CRLF & _
"(A) To inquire about prices" & @CRLF & _
"" & @CRLF & _
"(B) To sell her food" & @CRLF & _
"" & @CRLF & _
"(C) To invite her to a party" & @CRLF & _
"" & @CRLF & _
"(D) To order food and drinks" & @CRLF & _
"" & @CRLF & _
"3). Where will the party be held?" & @CRLF & _
"" & @CRLF & _
"(A) In a city park" & @CRLF & _
"" & @CRLF & _
"(B) At the man's company" & @CRLF & _
"" & @CRLF & _
"(C) On the beach" & @CRLF & _
"" & @CRLF & _
"(D) In a theater"
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