using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^\s";
string substitution = @"";
string input = @"
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
";
RegexOptions options = RegexOptions.Multiline;
Regex regex = new Regex(pattern, options);
string result = regex.Replace(input, substitution);
}
}
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 C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx