title: How to handle spaces with preg_split in PHP
body: <p>I'm getting a <code>ftp_rawlist</code> of files from FTP in PHP.</p>
  
  <p>I take the rawlist and run this code:</p>
  
  <pre><code>foreach ($ftp_rawlist AS $ff) {
  
      $ff = preg_split("/[\s]+/", $ff, 9);
  
      $perms = $ff[0];
      $user  = $ff[2];
      $group = $ff[3];
      $size  = $ff[4];
      $month = $ff[5];
      $day   = $ff[6];
      $file  = $ff[8];
  }
  </code></pre>
  
  <p>This works fine, but if a <code>$ff[8]</code> has a space at the beginning of the file name, my code doesn't parse it to <code>$file</code>.</p>
  
  <p>E.g. " file.pdf" is parsed as "file.pdf"</p>
  
  <p>I'm not sure how to modify my <code>preg_split</code> to capture spaces.</p>