title: Select elements with id attribute that starts/ends with a particular value
body: <p>Can jQuery or JavaScript be used with a regex to select multiple elements with similar id?</p>
  
  <p>I have the following paragraphs:</p>
  
  <pre><code>&lt;p id="item5_2"&gt; A &lt;/p&gt;
  &lt;p id="item9_5"&gt; B &lt;/p&gt;
  &lt;p id="item14_2"&gt; C &lt;/p&gt;
  </code></pre>
  
  <p>I want to change the content of paragraphs with id starting in <code>item</code> and ending in <code>2</code>.</p>
  
  <p>I used the following jQuery:</p>
  
  <pre><code>$("#item[\d]*2").html("D");
  </code></pre>
  
  <p>but it doesn't work. How can I get it to work? </p>
  
  <p><a href="http://jsfiddle.net/alexix/d5nHL/1/" rel="noreferrer">JSFiddle Demo</a></p>