scala/scala — pull request #1457 by smessmer (2012-10-03 21:54:32+00:00)
Title: Added Regex.matches(s:String)

I missed a function to directly check if a string complies to a regex.

- String.matches() only allows Strings as parameters (not Regex'es)
- The scala Regex class didn't offer a direct way.

The user had to write

val myRegex="some_regex".r
myRegex.pattern.matcher(string).matches

which I found to be too complicated. So I implemented a shortcut function in the scala Regex class.