title: Regex that will get dimensions from string
body: <p>I'm having a heck of a time finding a regex that will pull dimensions from a string.
  <br/>
  <br/></p>
  
  <p>Here is what I have so far, its not really doing what I want:</p>
  
  <pre><code>((\d+\s*(\d+\d+|\d+)*)\s*[xX]\s*(\d+\s*(\d+\d+|\d+)*)\s*[xX]\s*(\d+\s*(\d+\d+|\d+)*)|(\d+\s*(\d+\d+|\d+)*)\s*[xX]\s*(\d+\s*(\d+\d+|\d+)*)| (\d+\s*(\d+\d+|\d+)*))
  </code></pre>
  
  <p><br/></p>
  
  <p>Here are some examples of what it pulls (bolded):</p>
  
  <p>-16" x <strong>1476</strong>' <strong>80</strong> GA. EQ Ultra-Premium Hand Wrap - Use as replacement for <strong>18</strong>" x <strong>1500</strong>' <strong>80</strong> Gauge (4/Case)<br/>
  -<strong>48 x 60</strong>" Corrugated Sheet (250/Bale)<br/>
  -MP  Die Cut Divider <strong>25 7</strong>/ <strong>8 x 19 3</strong>/4  <strong>1000</strong>/bale<br/>
  -Part "B" (3"x<strong>3x 1</strong>/2" charcoal foam) only - extra pieces
  <br/>
  <br/></p>
  
  <p>I'm looking for it grab do the following:</p>
  
  <p>-<strong>16" x 1476</strong>' 80 GA. EQ Ultra-Premium Hand Wrap - Use as replacement for <strong>18" x 1500</strong>' 80 Gauge (4/Case)<br/>
  -<strong>48 x 60</strong>" Corrugated Sheet (250/Bale)<br/>
  -MP  Die Cut Divider <strong>25 7/8 x 19 3/4</strong> 1000/bale<br/>
  -Part "B" (<strong>3"x3 x 1/2"</strong> charcoal foam) only - extra pieces</p>
  
  <p>Notice the regex is not catching the lower part of the fraction because of the "/", also if an inch symbol (i.e. ") is between that dimension and another number it won't grab the first number, you can see that in the first example.</p>
  
  <p>Once I have this regex working, I can strip out the inch and foot symbols (i.e. " and '), and break each number down into each dimension. Just trying to pull the initial dimension numbers first.</p>
  
  <p>Thanks so much if you have any input.</p>