public class Test
{
public static bool Run()
{
string pattern = "^\\d+$";
Regex# re = Regex.Compile(pattern); //FAIL: swift TODO; cl
string s = "123";
Regex pre = re;
if (!re.IsMatch(s) || !pre.IsMatch("6502"))
return false;
s = "The quick brown fox jumps over the lazy dog";
re = Regex.Compile("(B.+?) (\\wo\\w)", RegexOptions.IgnoreCase); //FAIL: c TODO memleak
Match() m;
return m.Find(s, re)
&& m.Start == 10
&& m.End == 19
&& m.Length == 9
&& m.Value == "brown fox"
&& m.GetCapture(1) == "brown" && m.GetCapture(2) == "fox";
}
}