title: Getting specific value from url query string
body: <p>I have the following URL, and I want to get the "id" value from it using JavaScript.</p>
  
  <pre>https://www.blabla.com/ebookedit?id=B0077RQGX4&commit=Go</pre>
  
  <p>I started with this code:</p>
  
  <pre><code>var url = document.URL;
  var id_check = /^\id...\E; // NOT SURE HERE
  var final_id = new RegExp(id_check,url);
  </code></pre>
  
  <p>I want to extract the id "<strong>B0077RQGX4</strong>" and save it into a variable that I would later modify. How would I do it and <em>which functions</em> would I use in JavaScript?</p>