title: extract css urls using preg_math
body: <p>I use this function for get url list from css text. It success but if css text contains base64 image urls it break all. It should pass base64 image urls. How can i fix it?</p>
  
  <pre><code>function extractCssUrls( $text )
      {
          $urls=array();
          $matches=array();
          //$url_pattern     = '(([^\\\\\'", \(\)]*(\\\\.)?)+)';
          $url_pattern     = '(([^\\\\\'"\(\)]*(\\\\.)?)+)'; 
          $urlfunc_pattern = 'url\(\s*[\'"]?' . $url_pattern . '[\'"]?\s*\)';
          $pattern         = '/(' .
              '(@import\s*[\'"]' . $url_pattern     . '[\'"])' .
              '|(@import\s*'      . $urlfunc_pattern . ')'      .
              '|('                . $urlfunc_pattern . ')'      .  ')/iu';
          if ( !preg_match_all( $pattern, $text, $matches ) )
              return $urls;
  
          // @import '...'
          // @import "..."
          foreach ( $matches[3] as $match )
              if ( !empty($match) )
                  $urls['import'][] =
                      preg_replace( '/\\\\(.)/u', '\\1', $match );
  
          // @import url(...)
          // @import url('...')
          // @import url("...")
          foreach ( $matches[7] as $match )
              if ( !empty($match) )
                  $urls['import'][] =
                      preg_replace( '/\\\\(.)/u', '\\1', $match );
  
          // url(...)
          // url('...')
          // url("...")
          foreach ( $matches[11] as $match )
              if ( !empty($match) )
                  $urls['property'][] =
                      preg_replace( '/\\\\(.)/u', '\\1', $match );
  
          $urls=(isset($urls['property']))?$urls['property']:array();
  
          $urls=array_unique($urls);
          $urls=array_values($urls);
  
          return $urls;
      }
  </code></pre>
  
  <p>I found the bug. I remove <code>,</code> char from <code>$url_pattern</code> from variable.
   <code>$url_pattern='(([^\\\\\'"\(\)]*(\\\\.)?)+)';</code></p>