Created
July 23, 2014 08:48
-
-
Save urre/942c0c6553af68621b18 to your computer and use it in GitHub Desktop.
Regex for finding comments in source code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Regex for finding comments in source code | |
| (/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/)|(//.*) | |
| /** | |
| * Finds this | |
| */ | |
| // And this | |
| /* And this */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment