• Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • mantis-plugin
    • None

      The issue at hand is that Updater.java line 134:
      id = Integer.parseInt(matcher.group(1));
      always goes for the first group.
      When using a pattern like: ((issues?):?(\s*(,|and)?\s*(\d+))+) parsing fails.

      It would be welcome to be able to define the expression of the group the user wishes the matcher to match or define the group number.

          [JENKINS-23922] Regexp works only if one group exists.

          Alex Ouzounis added a comment -

          I can get around the issue by defined uncaptured groups like so:

          [iI]ssues?:?(?:\s*(?:,|and)?\s*(\d+))+

          As you can see the only matching group is (\d+) which gets correctly captured.

          Alex Ouzounis added a comment - I can get around the issue by defined uncaptured groups like so: [iI] ssues?:?(?:\s*(?:,|and)?\s*(\d+))+ As you can see the only matching group is (\d+) which gets correctly captured.

          Alex Ouzounis added a comment -

          No need to fix anything, just make sure you define your other groups as uncaptured by appending ?:

          Alex Ouzounis added a comment - No need to fix anything, just make sure you define your other groups as uncaptured by appending ?:

            alex_ouzounis Alex Ouzounis
            alex_ouzounis Alex Ouzounis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: