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

RegExp undefined behavior for print(/a(b*)?c/.exec("ac")[1])

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • core-libs
    • None

      print(/a(b*)?c/.exec("ac")[1])

      should print

      "undefined"

      and not

      ""

            hannesw Hannes Wallnoefer
            lagergren Marcus Lagergren
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: