using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?<=Bid\/Ask<\/TD>)[\s\S]*?(\d{2}\.\d{2})[\s\S]*?(\d{2}\.\d{2})[\s\S]*?(?=Low\/High<\/TD>)[\s\S]*?(\d{2}\.\d{2})[\s\S]*?(\d{2}\.\d{2})";
string input = @" <TR class=""spot"" bgColor='#f1f1f1'>
<TD>Bid/Ask</TD> <TD
align='middle' ><font
color=''>15.73</font></TD>
<TD align='middle' > </TD>
<TD align='middle' ><font
color=''>15.83</font></TD>
</TR>
<TR class=""spot"" bgColor=''>
<TD>Low/High</TD> <TD
align='middle' ><font
color=''>15.51</font></TD>
<TD align='middle' > </TD>
<TD align='middle' ><font
color=''>15.86</font></TD>
</TR>
";
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