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
/
^(?<flag>#+)\s*(?<content>.*?)\s*$
/
gm
Input 1
1
New
# The quick brown (1) ## fox jumps (1a) ###over (1a1) ###the (1a2) ## lazy dog (1b) # Foo bar (2) # Baz biz (3) ##buzz (3a) ##booz (3b) # Lorem ipsum (4) ##
Substitution