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

Regular expression replacements are always followed by a new line

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'm trying to append several items extracted from the console log, however each item is followed by a new line. I cannot see any way to prevent this. I would expect that when substText is used the new lines would need to be explicitly set.

      Example console:

      *** Application: Firefox 15.0a2
      *** Platform: Mac OS X 10.7.4 64bit

      Example tokens:

      ${BUILD_LOG_REGEX, regex="^\\*{3} Application: (.*)$", maxMatches=1, showTruncatedLines=false, substText="$1"} on ${BUILD_LOG_REGEX, regex="^\\*{3} Platform: (.*)$", maxMatches=1, showTruncatedLines=false, substText="$1"}

      Expected output:

      Firefox 15.0a2 on Mac OS X 10.7.4 64bit

      Actual output:

      Firefox 15.0a2
       on Mac OS X 10.7.4 64bit
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: slide
          Path:
          src/main/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContent.java
          src/test/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContentTest.java
          http://jenkins-ci.org/commit/email-ext-plugin/8b082b76331c17e12a5a6f67cd40ec097b311ae0
          Log:
          Fix JENKINS-14320

          • Added option addNewline (default true to maintain current behavior) which can be set to false to stop outputting a newline.
          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: slide Path: src/main/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContent.java src/test/java/hudson/plugins/emailext/plugins/content/BuildLogRegexContentTest.java http://jenkins-ci.org/commit/email-ext-plugin/8b082b76331c17e12a5a6f67cd40ec097b311ae0 Log: Fix JENKINS-14320 Added option addNewline (default true to maintain current behavior) which can be set to false to stop outputting a newline.
          Hide
          davehunt Dave Hunt added a comment -

          I have built from source and can confirm this fix.

          Show
          davehunt Dave Hunt added a comment - I have built from source and can confirm this fix.

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              davehunt Dave Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: