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
/
(<!--.*?-->)|(<!--[\S\s]+?-->)|(<!--[\S\s]*?$)
/
g
Input 1
New
<!-- Comment 1 --> <noinclude> {{draft}} </noinclude> # A # B # C # red → rouge # yellow → jaune # green → vert [pos:adjective, ipa: /vɜːt/] <!-- Comment 2a Comment 2b Comment 2c --> <!-- single-line --> <!-- <!-- nested single-line --> not a comment <!-- <!-- nested multiline --> <!-- multiline --> <!-- truncated
Extraction
<!-- Comment 1 --> <noinclude> {{draft}} </noinclude> # A # B # C # red → rouge # yellow → jaune # green → vert [pos:adjective, ipa: /vɜːt/] <!-- Comment 2a Comment 2b Comment 2c --> <!-- single-line --> <!-- <!-- nested single-line --> not a comment <!-- <!-- nested multiline --> <!-- multiline --> <!-- truncated