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]*\n).*(?<!\\)%
/
g
Input 1
1
New
(a) last line % now with comment (b) last line with escaped \% and not treated (c) last line withouth any special chars (d) last line terminates with % (e) last line terminates with escaped \% (f) beginning % but even escaped \% is ignored (g) Some text not containing percent
Extraction
(a) last line % now with comment (b) last line with escaped \% and not treated (c) last line withouth any special chars (d) last line terminates with % (e) last line terminates with escaped \% (f) beginning % but even escaped \% is ignored (g) Some text not containing percent