Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
@cartouche[^@]+@smallexample(.*?)@end smallexample[^@]+@end cartouche
/
s
Input 1
@cartouche @smallexample # file: quote.cfg quote = "Criticism may not be agreeable, but it is necessary." " It fulfils the same function as pain in the human" " body. It calls attention to an unhealthy state of" " things.\n" "\t--Winston Churchill"; @end smallexample @end cartouche @cartouche @smallexample # file: test.cfg info: @{ name = "Winston Churchill"; @@include "quote.cfg" country = "UK"; @}; @end smallexample @end cartouche
Extraction
@cartouche @smallexample # file: quote.cfg quote = "Criticism may not be agreeable, but it is necessary." " It fulfils the same function as pain in the human" " body. It calls attention to an unhealthy state of" " things.\n" "\t--Winston Churchill"; @end smallexample @end cartouche @cartouche @smallexample # file: test.cfg info: @{ name = "Winston Churchill"; @@include "quote.cfg" country = "UK"; @}; @end smallexample @end cartouche