1exbvg
Last Updated: February 25, 2016
·
6.867K
· jeroenr

Scala pattern matching with regex is awesome

Finally we can get rid of those ugly try-catch-solutions when trying to parse integers

https://gist.github.com/3358869

1 Response
Add your response

753

Discovered it today from answer on stackoverflow.com.

However, to check if regex matches without 'match' construct (to get boolean if it matches) some ugly method calls are required http://stackoverflow.com/questions/3021813/how-to-check-whether-a-string-fully-matches-a-regex-in-scala

over 1 year ago ·