Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32896

Regexp pattern: multiline mode doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • mantis-plugin
    • None
    •  CentOS 6.7, Jenkins-1.647, mantis-plugin-0.26, Gitlab-8.4.1 (omnibus)

      Hello,
      I'm using the following regular expression

      (?im)^#[0-9]{5,7},(.*)
      

      And I want to match multi line comments in git

      # git log --format=%B -n1
      #12345, Some description1
      #123456, Some description2
      #1234567, Some description3
      

      It works on PCRE with g modifier - https://regex101.com/r/bN3fE4/2

      g modifier: global. All matches (don't return on first match)

      But doesn't work in Regexp pattern. With such regular expression only first line of the comment has been matched

      > /usr/bin/git config core.sparsecheckout # timeout=10
       > /usr/bin/git checkout -f 929be896f4ec0557c0e290d8da3e7eb31048de7d
       > /usr/bin/git rev-list 68d319da9b2ea93bf03852fc61ca6f2f39247239 # timeout=10
      [MANTIS] Updating Mantis issue #12345
      Finished: SUCCESS
      

            sogabe sogabe
            alex_hha Alex Domoradov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: