示例#1
0
        public virtual IString Replace(Regex regex, IString input, string replacement, int count, int startat)
        {
            ReplacementEvaluator ev = new ReplacementEvaluator(regex, replacement);

            if (regex.RightToLeft)
            {
                return(RTLReplace(regex, input, new MatchEvaluator(ev.Evaluate), count, startat));
            }
            else
            {
                return(LTRReplace(regex, input, new MatchAppendEvaluator(ev.EvaluateAppend), count, startat, ev.NeedsGroupsOrCaptures));
            }
        }
示例#2
0
        public static IString Evaluate(string replacement, Match match)
        {
            ReplacementEvaluator ev = new ReplacementEvaluator(match.Regex, replacement);

            return(ev.Evaluate(match));
        }
示例#3
0
 virtual public IString Result(string replacement, Match match)
 {
     return(ReplacementEvaluator.Evaluate(replacement, match));
 }