Scala pattern matching with regex is awesome
Finally we can get rid of those ugly try-catch-solutions when trying to parse integers
Written by Jeroen Rosenberg
Related protips
1 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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Scala
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#