1exbvg
Last Updated: February 25, 2016
·
5.93K
· jeroenr
Dsc 0061

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

Say Thanks
Respond

1 Response
Add your response

753
73aa7ad0c97ecb6a1d766fa8810aba29

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 ·