title: Optional Whitespace Regex
body: <p>I'm having a problem trying to ignore whitespace in-between certain characters. I've been Googling around for a few days and can't seem to find the right solution.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>// Get Image data
  preg_match('#&lt;a href="(.*?)" title="(.*?)"&gt;&lt;img alt="(.*?)" src="(.*?)"[\s*]width="150"[\s*]height="(.*?)"&gt;&lt;/a&gt;#', $data, $imagematch);
  $image = $imagematch[4];
  </code></pre>
  
  <p>Basically these are some of the scenarios I have:</p>
  
  <pre><code> &lt;a href="/wiki/File:Sky1.png" title="File:Sky1.png"&gt;&lt;img alt="Sky1.png" src="http://media-mcw.cursecdn.com/thumb/5/56/Sky1.png/150px-Sky1.png"width="150" height="84"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>(Notice the lack of a space between width="" and src="")</p>
  
  <p>And</p>
  
  <pre><code>&lt;a href="/wiki/File:TallGrass.gif" title="File:TallGrass.gif"&gt;&lt;img alt="TallGrass.gif" src="http://media-mcw.cursecdn.com/3/34/TallGrass.gif" width="150"height="150"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>(Notice the lack of a space in between width="" and height="".)</p>
  
  <p>Is there anyway to ignore the whitespace in between those characters? As I am not a Regex expert.</p>