TRegEx.Replace使用问题
TRegEx类有一个
static System::UnicodeString __fastcall Replace(const System::UnicodeString Input, const System::UnicodeString Pattern, const System::UnicodeString Replacement, TRegExOptions Options)/* overload */;
这个函数,其中TRegExOptions Options的结构为
typedef System::Set<TRegExOption, TRegExOption::roNone, TRegExOption::roIgnorePatternSpace> TRegExOptions;
然后又A set of type TRegExOption:
enum TRegExOption : unsigned char { roNone, roIgnoreCase, roMultiLine, roExplicitCapture, roCompiled, roSingleLine, roIgnorePatternSpace };
请教:我想做一个忽略大小写替换,请问该如何写?
谢谢大侠
[解决办法]
Replace("Input", "Pattern", "Replacement", TRegExOptions() << roIgnoreCase);