$re = '/^\s/m';
$str = '
Description=Qualcomm Atheros AR8161 PCI-E Gigabit Ethernet Controller (NDIS 6.30)
MACAddress=FF:FF:FF:FF:FF:FF
Manufacturer=Qualcomm Atheros
NetConnectionID=Ethernet
Description=Realtek RTL8811AU Wireless LAN 802.11ac USB 2.0 Network Adapter
MACAddress=FF:FF:FF:FF:FF:FF
Manufacturer=Realtek Semiconductor Corp.
NetConnectionID=Wi-Fi
Description=VirtualBox Host-Only Ethernet Adapter
MACAddress=FF:FF:FF:FF:FF:FF
Manufacturer=Oracle Corporation
NetConnectionID=VirtualBox Host-Only Network
Description=Bluetooth Device (Personal Area Network)
MACAddress=FF:FF:FF:FF:FF:FF
Manufacturer=Microsoft
NetConnectionID=Connexion réseau Bluetooth 2
';
$subst = "";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
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