Created
March 7, 2012 10:06
-
-
Save sofoklis/1992349 to your computer and use it in GitHub Desktop.
simple loop and read regex
This file contains hidden or 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
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