using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @":?(\d+:\d+;)+\d+::";
string input = @"[04:04:55] Morpheus Deathbrew > is this okay? it's cap stable <url=fitting:11978:14240;1:2032;1:31366;1:1447;2:2281;1:31952;1:14136;1:31378;1:2104;1:3608;4:12058;1:2488;6:29001;6::>He Dead :(</url>
[04:04:55] Morpheus Deathbrew > is this okay? it's cap stable <url=fitting:11978:14240;1:2032;1:31366;1:1447;2:2281;1:31952;1:14136;1:31378;1:2104;1:3608;4:12058;1:2488;6:29001;6::>He Dead :(</url>
Character Name > <url=fitting:11978:14240;1:31366;1:1447;2:31952;1:14136;1:31378;1:2104;2:3608;4:12058;1:31932;1:2488;6:29001;5::>He Dead :(</url> asdf asefase 351235125
";
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