Created
December 4, 2012 05:18
-
-
Save snowe2010/4200882 to your computer and use it in GitHub Desktop.
Cleans the whitespace and comments from the file and returns them to a clean array
This file contains 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
@read_file.lines.to_a.each {|line| @whitespace_clean << line.gsub(/\/\/.*?$|\/\*.*?\*\/|\t\m|\*.*$|\/\*\*.*$/,"").strip} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Had to edit it a bit because it wasn't grabbing lines like /** blah