<?php

$html = '
<div style="height:100px;" id="main" >
<div style = height:100px; id="main" >
<a href="133"></a>
<blockquote color="123"/>
  <a class = asdfsdf href="http://n...content-available-to-author-only...t.com/.[some stuff to find].zip">
  <a href=\'http://n...content-available-to-author-only...t.com/.[more stuff to find].zip \'>
  <a hello world href = http://n...content-available-to-author-only...t.com/.[unquoted_stuff_to_find].zip />
<a>
';

$regex = '~
( < (?:div|span|a|img|ul|li|blockquote) (?=\s) )         # 1
   (?= 
     (?:
        (?:[^>"\']|"[^"]*"|\'[^\']*\')*? 
        (                                                      # 2
          \s  style \s*=
          (?: (?>  \s* ([\'"]) \s* (?:(?!\g{-1}) .)* \s* \g{-1} )  #3
            | (?>  (?!\s*[\'"]) \s* [^\s>]* (?=\s|>) )
          )
        )
     )?
   )
  \s* (?:".*?"|\'.*?\'|[^>]*?)+ 
( /?> )                                                  # 4
~xs';

echo preg_replace( $regex, '$1$2$4', $html);

?>
