Delphi Regular Expression Syntax (4): Common escape characters and.
//\d matches all numbers, equivalent to [0-9] var reg:tperlregex; begin Reg: = tperlregex.create (nil' expecting Delphi for win32! '; Reg. RegEx ' \d'//return: Expect Delphi for Win! Freeandnil (REG); End;
//\d matches all non-digits equivalent to [^0-9] var reg:tperlregex; begin Reg: = tperlregex.create (nil' expecting Delphi for win32! '; Reg. RegEx ' \d'//return: Freeandnil (reg); End;
//\w matches letters, numbers and underscores _, equivalent to [a-za-z0-9_] var reg:tperlregex; begin Reg: = tperlregex.create (nil' expecting Delphi for win32! '; Reg. RegEx ' \w'//return: Look! Freeandnil (REG); End;
//\w matches non-alphabetic, numeric and underscore _, equivalent to [^a-za-z0-9_] var reg:tperlregex; begin Reg: = tperlregex.create (nil' expecting Delphi for win32! '; Reg. RegEx ' \w'//return: Delphi for Win32 Freeandnil (REG); End;
//\s matches any whitespace, including spaces, tabulation, page breaks, etc., equivalent to [\f\n\r\t\v] var reg:tperlregex; begin Reg: = tperlregex.create (nil' expecting Delphi for win32! '; Reg. RegEx ' \s'//return: Expect Delphi for win32! Freeandnil (REG); End; {\f: page break \ n: newline character \ r: Carriage return \ t: tab (TAB) \v: Vertical tab}
//\s matches any non-whitespace equivalent to [^\f\n\r\t\v] var reg:tperlregex; begin Reg: = tperlregex.create (nil' expecting Delphi for win32! '; Reg. RegEx ' \s'//return: Freeandnil (reg); End;
//\x matches hexadecimal ASCII var reg:tperlregex; begin Reg: = tperlregex.create (nil' codegear Delphi '; Reg. the ASCII value of the RegEx ' \x61 '//A is 97, which is the hexadecimal"///return: Codege R Delphi Freean Dnil (REG); End; //Very sorry Tperlregex cannot use \u or \u to match Unicode characters!
match any characters except line breaks var reg:tperlregex; begin Reg: = tperlregex.create (nil' expect '#10' Delphi for win32! '//#10是换行符Reg. RegEx '. ' "' {return:} Freeandnil (REG); End;
Delphi Regular Expression Syntax (4): Common escape characters and.