Last Updated: May 30, 2022
·
7.306K
· Jeroen Rosenberg

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

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 ·