Match right Var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' Delphi 6; Delphi 7; Delphi 2007;
Delphi Net '; Reg. RegEx: = ' Delphi (? =2007) '; ? = Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject); Back: Delphi 6; Delphi 7; 2007;
Delphi Net Freeandnil (reg);
End
Do not match the right Var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' Delphi 6; Delphi 7; Delphi 2007;
Delphi Net '; Reg. RegEx: = ' Delphi ' (?! 2007) ';
// ?! Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject); Returns: 6; 7; Delphi 2007;
Net Freeandnil (REG);
End
Match left Var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg.
Subject: = ' 111, 222,¥333,¥444 '; Reg. RegEx: = ' (? <=¥) \d{3} '; ? <= Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
Return: 111, 222,¥,¥ Freeandnil (reg);
End
does not match left Var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. SubjECT: = ' 111, 222,¥333,¥444 '; Reg. RegEx: = ' (? <!¥) \d{3} ';
? <! Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
return:,¥333,¥444 Freeandnil (REG); End