using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(\d+.\d+) ""([\w]+)";
string input = @" ""Title: Y""
""Method: Mass-loaded (1.500 grams)""
""DCR mode: Measure (-0.07 ohms)""
""Area (Sd): 12.88 sq cm""
""QC-limits file: ""
""Last setup file: C:\MLS\SPO-W.SET modified ""
""Series resistance: 75.00 ohms""
""Stimulus level: 4.08 volts""
""SPLref reference impedance: NONE""
""Large units (volume = liters, mass = grams)""
0.169 ""RMSE-free Ohms""
202.854 ""Fs Hz""
3.473 ""Re Ohms[dc]""
23.567 ""Res Ohms""
6.487 ""Qms ""
0.956 ""Qes ""
0.833 ""Qts ""
0.065 ""L1 mH""
0.058 ""L2 mH""
0.827 ""R2 Ohms""
0.130 ""RMSE-load Ohms""
0.092 ""Vas(Sd) liters""
1.551 ""Mms grams""
396.893 ""Cms �M/Newton""
2.680 ""Bl Tesla-M""
80.900 ""SPLref(Sd) dB ""
0.043 ""Rub-index ""
";
foreach (Match m in Regex.Matches(input, pattern))
{
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