/// <summary> /// Replaces the token from the buffer between the provided tokens /// </summary> /// <param name="buffer">Buffer to update</param> /// <param name="rpBetweenToken">replacement token</param> public virtual void ReplaceBetweenTokens(ref string buffer, ReplaceBetweenPairToken rpBetweenToken) { string regularExp = rpBetweenToken.TokenStart + "[^" + rpBetweenToken.TokenIdentifier + "]*" + rpBetweenToken.TokenEnd; buffer = System.Text.RegularExpressions.Regex.Replace(buffer, regularExp, rpBetweenToken.TokenReplacement); }