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

Regex could not match anything

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • content-replace-plugin
    • None
    • Version plugin 1.8
      Jenkins version 2.387.3

      I have an issue upgrading the plugin from 1.7 to 1.8.

      The following plugin configuration

      contentReplace(
          configs: [
              fileContentReplaceConfig(
                  configs: [
                      fileContentReplaceItemConfig( 
                          search: '(Server=)([^;]+)(;.*Database=)([^;]+)(;.*Password=)([^;]+)(;)',
                          replace: "\$1$server\$3$database\$5$password;",
                          matchCount: 1
                      )
                  ],
                  fileEncoding: 'UTF-8',                 
                  filePath: "configFilePath"
              )
          ]
      ) 

      will not match

      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
         ...
         <connectionStrings>
           <add name="DatabaseConnection" connectionString="Server=server;Database=database;User ID=sa;Password=password;MultipleActiveResultSets=True;" />
         </connectionStrings>
         ...
      </configuration>

       

      It was working before the update to 1.8.

      Downgrading the plugin to previous version 1.7 resolved my problem.

       

      Let me know if you need/want more details.

       

      And thanks for any help (:

            moxun mo xun
            mowa Jean-Baptiste
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: