Using a regular expression to access values ββfrom a map in keys
val m = Map("a"->2,"ab"->3,"c"->4) scala> m.get("a"); scala> println(res.get) 2 scala> m.get(/a\.*/) // or something similar. Can I get a list of all key-value pairs, where the key contains "a" without having to repeat it all over the map, doing something as simple as setting a regular expression in the key value?
Thanks in advance!
+5