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
/
((?<!\\)(?:\\\\)*)%.*
/
gm
Input 1
1
New
\usepackage{test}%COMMENT1 TEXT %COMMENT2 TEXT Value is 10\%, this should not be removed. %COMMENT3 begin{tikz}[ important 1, %COMMENT4 important 2, %COMMENT5 ] TEXT %COMMENT 6 TEXT Table: value1&value2\\%COMMENT7 Table: value1&value2\\ %COMMENT8 Table: value1&value2 \\%COMMENT 9 Table: value1&value2\\% COMMENT 10 Table: value1&value2\\\\%COMMENT11
Substitution
$1