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
/
^-((?:(?:(?!{.*?})[^-\n]|{.*?})|(?:(?:(?!{.*?})[^-\n]|{.*?})*?-){2})*)-
/
gm
Input 1
1
New
-Hello everybody!- I'm here! -This {stuff} matches- here. -No match found {here-}. -But this last {hyphen-} works- -some -inner hyphens- inside- here. -some --inner hyphens- but the odd one outside -. -inner hyphens -inside- {braces-} -are- still ignored in this count- as usual- -Hyphens both before- and after {the-braces} must be counted- -This is {fine- -And so is this- here} -----
Extraction