コード例 #1
0
        /// <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);
        }
コード例 #2
0
ファイル: TokenProcessor.cs プロジェクト: svick/visualfsharp
 /// <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);
 }