title: How to loop around and build an IP Address
body: <p>Given 1.1.%.%, where % is a wildcard, I want to loop through all possible IP addresses. </p>
  
  <p>So far I have been able to replace one % successfully with a loop, but when I attempt to try to replace 2, it simply replaces it with the same number. The following is the code I have at the moment, any help on how to put in this second loop to get the second % would be appreciated.  </p>
  
  <p>Code: </p>
  
  <pre><code>var wildCount = inputSt.match(/\%/g)  //works out how many % are there
  var newPlaceholder ='' 
  for (var i = 0; i &lt; wildCount.length; i++){
      newPlaceHolder =inputSt.split("%").join(i)
      for (var n = 0; n &lt;=254; n++){
          newPlaceholder = inputSt.split("%").join(n)
       }
   }
  </code></pre>
  
  <p>Output from this is 1.1.0.0, then 1.1.1.1, etc. </p>