Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
(\/\*.*?\*\/)|(\/\/.*$)|"((?:[^"\n\r]|\\.)*)\\$|"((?:\\.|[^"\n\r])*)"|(?:'(\\?.)')
/
gm
Input 1
1
New
std::string s = "dummy text"; // comment std::string s = "dummier text about \"nothing\""; // dont "worry" std::string multiLineString = "dummy multiline \ another line"; std::string s1="aaa", s2="bbb"; /* "Not a string" */ std::string multiString="aaa" "bbb"; std::string division="a/b=c"; std::string notComment="The following /* isn't a comment*/. Not this either // OK "; char c = '\t'; char c = '\''; char c = '\\';