title: How to check whether a String fully matches a Regex in Scala?
body: <p>Assume I have a Regex pattern I want to match many Strings to.</p>
  
  <pre><code>val Digit = """\d""".r
  </code></pre>
  
  <p>I just want to check whether a given String fully matches the Regex. What is a good and idiomatic way to do this in Scala?</p>
  
  <p>I know that I can pattern match on Regexes, but this is syntactically not very pleasing in this case, because I have no groups to extract:</p>
  
  <pre><code>scala&gt; "5" match { case Digit() =&gt; true case _ =&gt; false }
  res4: Boolean = true
  </code></pre>
  
  <p>Or I could fall back to the underlying Java pattern:</p>
  
  <pre><code>scala&gt; Digit.pattern.matcher("5").matches
  res6: Boolean = true
  </code></pre>
  
  <p>which is not elegant, either.</p>
  
  <p>Is there a better solution?</p>