Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6985262

Documentation of regular expressions for non-capturing groups is not correct

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6u21
    • core-libs

      FULL PRODUCT VERSION :
      Java 1.6.x-y

      ADDITIONAL OS VERSION INFORMATION :
      Documentation issue, all OS

      A DESCRIPTION OF THE PROBLEM :
      This issue has already been addressed by bug 6371680 which has been closed with fixing.
      The API documentation for the class java.util.regex.Pattern states that "Groups beginning with (? are pure, non-capturing groups" which is definitively false and must be replaced by "(?:"
      The wrong description is still present for example in <http://download.oracle.com/javase/tutorial/essential/regex/groups.html> or the Javadoc page of java.util.regexp.Pattern


      REPRODUCIBILITY :
      This bug can be reproduced always.

            sherman Xueming Shen
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: