public override int Match(string textToMatch, int matchAtIndex) { if (regEx == null) return 0; Match match = regEx.Match(textToMatch, matchAtIndex); if (match.Success) { return match.Length; } return 0; }