I've made a regex expression to capture code comments which seems to be working except in the case when the comments contains * [anynumber of characters inbetween] /
, e.g.:
/* these are some comments
=412414515/ * somecharacters /][;';'] */
Regex: (\/\*[^*]*[^/]*\*\/)
For a start, I suggest this pattern:
Demo
Just use a lazy operator instead of trying to not match *