title: Uncaught TypeError: Cannot read property in Chrome
body: <p>I created a script that is supposed to go to each individual link, check how much it is selling for, and if it is selling for equal to or under the price I typed in, it will say it on the title string. 
  For whatever reason, when executing it on Chrome, the following error pops up 95% of the time:
  Uncaught TypeError: Cannot read property '1' of null </p>
  
  <p>JShint doesn't help either, because no matter what I change, it always says the same error. If it helps, I think the error is around the regex line.</p>
  
  <p>The script:</p>
  
  <pre><code>var IDs = [136758649, 116770724, 136171998, 113325603, 111903483, 116786719, 136172656, 139152118, 121926643, 120759721] //Shortened down to a few IDs
  var PriceWanting = Number(prompt("How much is the max you would do?"))
  document.write('&lt;p id = "title"&gt;Total number bought: 0 items for a total of 0&lt;/p&gt;')
  var buys = 0
  var totalrobuxspent = 0
  console.log("Bot started")
  var loop = setInterval(function () {
      for (var i = 0; i &lt; IDs.length; i++) {
          $.get(" http://m.roblox.com/items/" + IDs[i] + "/privatesales", function (data) {
              var Regex = /\&lt;span class="currency-robux"&gt;([\d,]+)\&lt;\/span\&gt;/
              var PriceSelling = data.match(Regex)[1]
              PriceSelling = Number(PriceSelling.replace(",", ""))
              PriceSelling = PriceSelling * 1
              totalrobuxspent = totalrobuxspent + PriceSelling
              var remaining = PriceWanting - PriceSelling
              if (remaining &gt;= -0.1) {
                  buys = buys + 1
                  document.getElementById("title").innerHTML = "Total number of items bought: " + buys + " for a total of " + totalrobuxspent
              }
          })
      }
  }, 3636) //Long intervals so it doesn't lag too badly; mainly for me testing
  </code></pre>