Skip to content

Instantly share code, notes, and snippets.

@sofoklis
Created March 7, 2012 10:06
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 sofoklis/1992349 to your computer and use it in GitHub Desktop.
Save sofoklis/1992349 to your computer and use it in GitHub Desktop.
simple loop and read regex
lines.foreach(line ⇒ line match {
case RegEx(id, yesNo, name, optional, amount) ⇒ println(Line(id.toLong,
booleanFromString(yesNo).get,
name, optionString(optional), amount.toDouble))
case _ ⇒ println("Something Wrong!")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment