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)); } }
public static IString Evaluate(string replacement, Match match) { ReplacementEvaluator ev = new ReplacementEvaluator(match.Regex, replacement); return(ev.Evaluate(match)); }
virtual public IString Result(string replacement, Match match) { return(ReplacementEvaluator.Evaluate(replacement, match)); }