标签:style blog http color os ar sp strong div
// EscapeRegExChars 函数可以自动为特殊字符加转义符号 \ var reg: TPerlRegEx; begin reg := TPerlRegEx.Create(nil); reg.Subject := ‘C++Builer‘; reg.RegEx := reg.EscapeRegExChars(‘C+‘) + ‘{2}‘; {相当于 ‘C\+{2}‘} reg.Replacement := ‘◆‘; reg.ReplaceAll; ShowMessage(reg.Subject); {返回: ◆Builer} FreeAndNil(reg); end;
Delphi 正则表达式之TPerlRegEx 类的属性与方法(6): EscapeRegExChars 函数
标签:style blog http color os ar sp strong div
原文地址:http://www.cnblogs.com/honeynm/p/4059942.html