Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^([AQ]):(?:.|\n(?![AQ]:))+
/
gm
Input 1
1
New
Q: This is a question. Q: This is a 2nd question on two lines. A: This is an answer. A: This is a 2nd answer on two lines. Q: Here's another question. A: And another answer. Testing. 123.