I'm new to regex.
I try to remove unused code in project like
/*
// random unmanaged annotation
foo = var;
doSomething();
multilineFunction(a,
b);
*/
and leave "not code" annotation
/*
real annotation
*/
I try to find and replace with regular expresion that "inside between /* and */ contains line endwith ;" but It's doesn't work with my regex. How make that regex?
I tried inside of /* */ by (/\*)(.*\n)*?(.*\*/)
, and cotains line endswith ; (/\*)(.*\n)*?(.*;\n)(.*\n)(.*\*/)
but this regex find last match of */ and maybe dirty.
Edit: I wanted to do this only as replacement function in IDE. I solved it now by writing python code, but I'm still curious.