title: Attempt to split string on '//' in Jenkinsfile splits on '/' instead
body: <blockquote>
    <p><strong>What is the correct way to tokenize a string on double-forward-slash <code>//</code> in a <code>Jenkinsfile</code>?</strong>  </p>
  </blockquote>
  
  <p>The example below results in the string being tokenized on single-forward-slash <code>/</code> instead, which is not the desired behavior.</p>
  
  <p><hr><strong>Jenkinsfile</strong><hr></p>
  
  <p>An abbreviated, over-simplified example of the <code>Jenkinsfile</code> containing the relevant part is:  </p>
  
  <pre><code>node {
      // Clean workspace before doing anything
      deleteDir()
  
      try {
          stage ('Clone') {
              def theURL = "http://&lt;ip-on-lan&gt;:&lt;port-num&gt;/path/to/some.asset"
              sh "echo 'theURL is: ${theURL}'"
              def tokenizedURL = theURL.tokenize('//')
              sh "echo 'tokenizedURL is: ${tokenizedURL}'"
          }
      } catch (err) {
          currentBuild.result = 'FAILED'
          throw err
      }
  }
  </code></pre>
  
  <p><hr><strong>The Logs:</strong><hr>  </p>
  
  <p>The log output from the preceding is:  </p>
  
  <pre><code>echo 'theURL is: http://&lt;ip-on-lan&gt;:&lt;port-num&gt;/path/to/some.asset'— Shell Script&lt;1s
      [ne_Branch-Name-M2X23QGNMETLDZWFK7IXVZQRCNSWYNTDFJZU54VP7DMIOD6Z4DGA] Running shell script
      + echo theURL is: http://&lt;ip-on-lan&gt;:&lt;port-num&gt;/path/to/some.asset
      theURL is: http://&lt;ip-on-lan&gt;:&lt;port-num&gt;/path/to/some.asset
  
  echo 'tokenizedURL is: [http:, &lt;ip-on-lan&gt;:&lt;port-num&gt;, path, to, some.asset]'— Shell Script&lt;1s  
      [ne_Branch-Name-M2X23QGNMETLDZWFK7IXVZQRCNSWYNTDFJZU54VP7DMIOD6Z4DGA] Running shell script
      + echo tokenizedURL is: [http:, &lt;ip-on-lan&gt;:&lt;port-num&gt;, path, to, some.asset]
      tokenizedURL is: [http:, &lt;ip-on-lan&gt;:&lt;port-num&gt;, path, to, some.asset]
  </code></pre>
  
  <p><strong>Note that the logs show that the string is being tokeni on <code>/</code> instead of on <code>//</code>.</strong></p>