Skip to content

Instantly share code, notes, and snippets.

@xlson
Created September 11, 2011 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xlson/1209869 to your computer and use it in GitHub Desktop.
Save xlson/1209869 to your computer and use it in GitHub Desktop.
@Grab('com.xlson.groovycsv:groovycsv:1.0')
import com.xlson.groovycsv.CsvParse
def csv = '''Name-Lastname
Mark-'Anderson-Nielsen'
Pete-Hansen'''
def data = new CsvParser().parse(csv, separator: '-', quoteChar: "'")
for(line in data) {
println "$line.Name $line.Lastname"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment