示例#1
0
 static public int RegexPartOut(this string item, CachedRegex pattern, out string output1, out string output2, out string output3)
 {
     return(item.RegexMatch(pattern).Groups
            .Bridge <Group>()
            .Offset(1)
            .Convert(g => g.Value)
            .PartOut(out output1, out output2, out output3));
 }
示例#2
0
 static public string RegexGetGroup(this string item, CachedRegex pattern, string group)
 {
     return(item.RegexMatch(pattern).Groups[group].Value);
 }
示例#3
0
 static public string RegexExtract(this string item, CachedRegex pattern, string group, out string capture)
 {
     return(item.ExtractMatch(item.RegexMatch(pattern), group, out capture));
 }
示例#4
0
 static public string[] RegexSplit(this string item, CachedRegex pattern)
 {
     return(pattern.Split(item));
 }
示例#5
0
 static public string RegexReplaceBlock(this string item, CachedRegex pattern, string block)
 {
     return(item.RegexReplaceBlock(pattern, delegate(Match match) {
         return block;
     }));
 }
示例#6
0
 static public string RegexReplace(this string item, CachedRegex pattern, string replacement)
 {
     return(item.RegexReplace(pattern, delegate(Match match) {
         return replacement;
     }));
 }
示例#7
0
 static public string RegexReplaceBlock(this string item, CachedRegex pattern, MatchEvaluator match_evaluator)
 {
     return(item.RegexReplace(pattern, delegate(Match match) {
         return item.PrepareBlockForInsert(match_evaluator(match), match.Index);
     }));
 }
示例#8
0
 static public string RegexReplace(this string item, CachedRegex pattern, MatchEvaluator match_evaluator)
 {
     return(pattern.Replace(item, match_evaluator));
 }
示例#9
0
 static public MatchCollection RegexMatches(this string item, CachedRegex pattern)
 {
     return(pattern.Matches(item));
 }
示例#10
0
 static public Match RegexMatch(this string item, CachedRegex pattern)
 {
     return(pattern.Match(item));
 }
示例#11
0
 static public bool RegexIsMatch(this string item, CachedRegex pattern)
 {
     return(pattern.IsMatch(item));
 }
示例#12
0
 static public string RegexRemove(this string item, CachedRegex pattern)
 {
     return(item.RegexReplace(pattern, ""));
 }