using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^\s+$";
string input = @"
General Information
Brand:
Whirlpool
Model name:
PACW9HP
Type:
On/Off
Construction Type:
Free-Standing
Number of Speeds:
7
Mode
Cooling:
Yes
Heating:
Yes
Antibacterial Filters:
Yes
Ionization:
Yes
Sleep Function:
Yes
Conditioner Features
Recommended Area:
25 - 30 m²
Capacity Cooling (BTU):
9000
Capacity Heating (BTU):
8500
Capacity Cooling (W):
3000
Capacity Heating (W):
2000
Air Flow:
350 m³/h
Indoor Noise Level:
65
HEPA Filter:
Yes
Compressor
Refrigerant:
R410A
Type of Compressor:
Rotary
Energy Rating
Energy Efficiency Class:
A+
Remote Control
Remote Control:
Yes
Timer on / off:
Yes
Power
Power from:
Network
Voltage:
200-240 V
Cord Length:
1.2 m
Color
Color:
White
Dimensions
Dimensions (W x H x D):
448 x 743 x 400 mm
Weight
Weight:
31 kg
Warranty
Warranty:
36 Months
";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
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