I am trying to use this regex (JS):
/\/\*(.*)\*\//g
To replace
/*
sdandsads
*/
with nothing.
But it is not working! Why? o_O
I am trying to use this regex (JS):
/\/\*(.*)\*\//g
To replace
/*
sdandsads
*/
with nothing.
But it is not working! Why? o_O
Two problems:
[^]
.Solution:
/\/\*[^]*?\*\//g
Example:
> '/*abc\ncde*/qqq/*iop\n\njj*/'.replace(/\/\*[^]*?\*\//g, '')
qqq