title: iframe Regular Expression form validation
body: <p>I'm having trouble validating a form entry using a regular expression. I am only just learning regular expressions and specifically for this task.  </p>
  
  <p>The problem: I have attempted to write a regex that would match a soundcloud iframe. However, the form entry is accepted whether the entry is a soundcloud iframe or not. Any help would be much appreciated! </p>
  
  <p>This is the function I came up with:</p>
  
  <pre><code>function iframe_match ($iframe){
  return(preg_match('#/&lt;iframe width="100%" height="450" scrolling="no" frameborder="no"     src="https://w.soundcloud.com/player/\?url=http%3A%2F%2Fapi.soundcloud.com%2F|[a-z]|%|[0-9]|    [F]|"&gt;\&lt;/iframe\&gt;/#', $iframe)) ? true : false;
  }
  </code></pre>
  
  <p>And this is the specific form check:</p>
  
  <pre><code>else if (iframe_match($_POST['track_file1']) === false){
  echo '&lt;br/&gt;&lt;br/&gt;&lt;font color="red"&gt;&lt;strong&gt;Must include an iframe&lt;/strong&gt;&lt;font&gt;'; 
   }
  </code></pre>