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
r"
\\(My\w+)[{]((?:[^{}]*|[{][^{}]*[}])*)[}]
"
g
Input 1
New
\MyTitle{This is a title with some \commands{with some arguments} inside} which is followed by some text with many lines and any kind of things inside and at some point an abstract can be defined like \MyAbstract{% including the abstract which can have also \commands{inside with possiblguments} or not and can longer than a line \commands{inside with possiblguments} }