I am trying to quickly remove comments from code using NotePad++ regex search function and I have got a regex for several types of comment.
(?s)/\*.*?\*/
Removes comments like /*** comment ***/ or
/*
* comment
*/
However when it comes to a comment such as
your code //Comment
I cannot find a regex which works.
I have tried a regex such as
//(?:[^\w]*\w){0,}(?!\n)
However it doesn't stop at the end of a line.
So my question is what regex should I use which will remove from and including //
to the end of a line