Skip to content

Instantly share code, notes, and snippets.

View mac01021's full-sized avatar

Matthew Coolbeth mac01021

View GitHub Profile
val pattern = java.util.regex.Pattern.compile ("""(?xs) ("(.*?)"|) ; ("(.*?)"|) (?: \r?\n | \z ) """)
val matcher = pattern.matcher (input)
while (matcher.find) {
val col1 = matcher.group (2)
val col2 = matcher.group (4)
// ...
}