Skip to content

Instantly share code, notes, and snippets.

@snowe2010
Created December 4, 2012 05:17
Show Gist options
  • Save snowe2010/4200868 to your computer and use it in GitHub Desktop.
Save snowe2010/4200868 to your computer and use it in GitHub Desktop.
Scans array elements for tokens then writes them to a file, token_type(t) returns the xml for that token
@whitespace_clean.each { |t| t.scan(/".*?"|\w+|[\[\]\.\(\){};=,+\-<>~\&\*\/\|]/) {|t| @write_file.write(token_type(t)) }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment