Hi
I'm trying to make a simple perl code that reads a code file and removes all comments (javascript style), like //... or /*... */ and /*....new line (number of time unknown)
Can someone give me an hand? Removing patterns like // or /*...*/ can be done, I think, with /\/+\*?\.*/gi but there are weird things on a random code. For instance, line breaks or the lines beginning with spaces or tabs. So I could do /([\ |\t]*)\/+\*?\.*/gi perhaps
Best regards
In reply to Comments regex by kepler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |