title: Scala regex Named Capturing Groups
body: <p>In <a href="http://www.scala-lang.org/api/current/scala/util/matching/Regex$$MatchData.html" rel="nofollow noreferrer">scala.util.matching.Regex trait MatchData</a> I see that there support for groupnames , I thought that this was related to (<a href="http://www.regular-expressions.info/named.html" rel="nofollow noreferrer">Regex Named Capturing Groups</a>) </p>
  
  <p>But since <a href="https://stackoverflow.com/questions/415580/regex-named-groups-in-java">Java does not support groupnames until version 7</a> as I understand it (<a href="http://blogs.oracle.com/xuemingshen/entry/named_capturing_group_in_jdk7" rel="nofollow noreferrer">ref</a>), <em>Scala version 2.8.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.</em> gives me this exception: </p>
  
  <pre><code>scala&gt; val pattern = """(?&lt;login&gt;\w+) (?&lt;id&gt;\d+)""".r
  java.util.regex.PatternSyntaxException: Look-behind group does not have an obvio
  us maximum length near index 11
  (?&lt;login&gt;\w+) (?&lt;id&gt;\d+)
             ^
          at java.util.regex.Pattern.error(Pattern.java:1713)
          at java.util.regex.Pattern.group0(Pattern.java:2488)
          at java.util.regex.Pattern.sequence(Pattern.java:1806)
          at java.util.regex.Pattern.expr(Pattern.java:1752)
          at java.util.regex.Pattern.compile(Pattern.java:1460)
  </code></pre>
  
  <p>So the question is Named Capturing Groups supported in Scala? If so any examples out there? </p>