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*\/\/.*)
/
gm
Input 1
1
New
String str1 = "SUM 10" /*This is a Comments */ ; String str2 = "SUM 10"; //This is a Comments" String str3 = "http://google.com"; /*This is a Comments*/ String str4 = "('file:///xghsghsh.html/')"; //Comments String str5 = "{\"temperature\": {\"type\"}}"; //comments
Substitution
\1
String str1 = "SUM 10" /*This is a Comments */ ; String str2 = "SUM 10"; //This is a Comments" String str3 = "http://google.com"; /*This is a Comments*/ String str4 = "('file:///xghsghsh.html/')"; //Comments String str5 = "{\"temperature\": {\"type\"}}"; //comments