public virtual string Replace (Regex regex, string 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 virtual string Replace(Regex regex, string input, string replacement, int count, int startat) { ReplacementEvaluator replacementEvaluator = new ReplacementEvaluator(regex, replacement); if (regex.RightToLeft) { return(RTLReplace(regex, input, replacementEvaluator.Evaluate, count, startat)); } return(LTRReplace(regex, input, replacementEvaluator.EvaluateAppend, count, startat, replacementEvaluator.NeedsGroupsOrCaptures)); }
public virtual string Replace(Regex regex, string input, string replacement, int count, int startat) { ReplacementEvaluator replacementEvaluator = new ReplacementEvaluator(regex, replacement); if (regex.RightToLeft) { return(this.RTLReplace(regex, input, new MatchEvaluator(replacementEvaluator.Evaluate), count, startat)); } return(this.LTRReplace(regex, input, new BaseMachine.MatchAppendEvaluator(replacementEvaluator.EvaluateAppend), count, startat, replacementEvaluator.NeedsGroupsOrCaptures)); }
public virtual string Replace(Regex regex, string 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 string Evaluate(string replacement, Match match) { ReplacementEvaluator replacementEvaluator = new ReplacementEvaluator(match.Regex, replacement); return(replacementEvaluator.Evaluate(match)); }
virtual public string Result(string replacement, Match match) { return(ReplacementEvaluator.Evaluate(replacement, match)); }
public static string Evaluate (string replacement, Match match) { ReplacementEvaluator ev = new ReplacementEvaluator (match.Regex, replacement); return ev.Evaluate (match); }
public string Replace(string input, string replacement, int count, int startat) { ReplacementEvaluator ev = new ReplacementEvaluator(this, replacement); return(Replace(input, new MatchAppendEvaluator(ev.EvaluateAppend), count, startat)); }
public virtual string Result(string replacement) { return(ReplacementEvaluator.Evaluate(replacement, this)); }
public string Replace (string input, string replacement, int count, int startat) { ReplacementEvaluator ev = new ReplacementEvaluator (this, replacement); return Replace (input, new MatchAppendEvaluator (ev.EvaluateAppend), count, startat); }