Delphi Regular Expression Syntax (9): Critical match-also called "Pre-search" and "reverse pre-search"
//Match right var reg:tperlregex; begin Reg: = tperlregex.create (nil' Delphi 6; Delphi 7; Delphi 2007; Delphi Net '; Reg. RegEx ' delphi (? =2007) '//? ='//Return: Delphi 6; Delphi 7; ; Delphi Net Freeandnil (reg); End;
//Mismatch to the right var reg:tperlregex; begin Reg: = tperlregex.create (nil' Delphi 6; Delphi 7; Delphi 2007; Delphi Net '; Reg. RegEx ' Delphi (?! ) '//?! "' //return: 6; 7; Delphi 2007; Net Freeandnil (reg); End;
//Match left var reg:tperlregex; begin Reg: = tperlregex.create (nil' 111, 222,¥333,¥444 '; Reg. RegEx ' (? <=¥) \d{3} '//? <='//return: 111, 222,¥,¥ Freeandnil ( REG); End;
//Do not match left var reg:tperlregex; begin Reg: = tperlregex.create (nil' 111, 222,¥333,¥444 '; Reg. RegEx ' (? <!¥) \d{3} '//? <! "' //return:,,¥333,¥444 Freeandnil (REG); End;
Delphi Regular Expression Syntax (9): Critical match-also called "Pre-search" and "reverse pre-search"