This is my source string:
<3>
<1>
<8>
This is my Regex Patern:
<(
-
2020-12-09 08:40
class Program
{
static void Main(string[] args)
{
string sourceString = @"<3>
<1>
<8>";
Regex ItemRegex = new Regex(@"<(?- \w+?)><(?\d+?)>", RegexOptions.Compiled);
foreach (Match ItemMatch in ItemRegex.Matches(sourceString))
{
Console.WriteLine(ItemMatch);
}
Console.ReadLine();
}
}
Returns 3 matches for me. Your problem must be elsewhere.