$re = '/(?<=sda1)\s+(?|(\d+.?\d+)[G,M.L,%]?)\s+(?|(\d+.?\d+)[G,M.L,%]?)\s+(?|(\d+.?\d+)[G,M.L,%]?)\s+(\d+)%/m';
$str = 'Filesystem Size Used Avail Use% Mounted on
udev 3.8G 0 3.8G 0% /dev
tmpfs 806M 5.3M 800M 1% /run
/dev/mmcblk0p2 235G 59G 164G 27% /
tmpfs 4.0G 0 4.0G 0% /dev/shm
tmpfs 5.0M 48K 5.0M 1% /run/lock
/dev/mmcblk0p1 510M 63M 448M 13% /boot/firmware
/dev/sda1 137.8G 299.88G 127G 3% /media/usbplatte
tmpfs 806M 0 806M 0% /run/user/1000
/dev/sda1 139752 2662 129920 3% /media/usbplatte
';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php