Esempio n. 1
0
		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);
		}
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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));
        }
Esempio n. 4
0
        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));
            }
        }
Esempio n. 5
0
        public static string Evaluate(string replacement, Match match)
        {
            ReplacementEvaluator replacementEvaluator = new ReplacementEvaluator(match.Regex, replacement);

            return(replacementEvaluator.Evaluate(match));
        }
Esempio n. 6
0
 virtual public string Result(string replacement, Match match)
 {
     return(ReplacementEvaluator.Evaluate(replacement, match));
 }
Esempio n. 7
0
		public static string Evaluate (string replacement, Match match)
		{
			ReplacementEvaluator ev = new ReplacementEvaluator (match.Regex, replacement);
			return ev.Evaluate (match);
		}
Esempio n. 8
0
        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));
        }
Esempio n. 9
0
 public virtual string Result(string replacement)
 {
     return(ReplacementEvaluator.Evaluate(replacement, this));
 }
Esempio n. 10
0
		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);
		}