\d matches all numbers, equivalent to [0-9] var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' expect Delphi 2008 for win32!
'; Reg.
RegEx: = ' \d '; Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
Return: Look forward to Delphi for Win!
Freeandnil (REG);
End
\d matches all non-numeric, equivalent to [^0-9] var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' expect Delphi 2008 for win32!
'; Reg.
RegEx: = ' \d '; Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
Return: 2008 Freeandnil (REG);
End
\w matches letters, numbers and underscores _, equivalent to [a-za-z0-9_] var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' expect Delphi 2008 for win32!
'; Reg.
RegEx: = ' \w '; Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
Back: Look!
Freeandnil (REG);
End
\w matches non-letters, numbers and underscores _, equivalent to [^a-za-z0-9_] var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' Expect Delphi 2008 for win32!
'; Reg.
RegEx: = ' \w '; Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
Return: Delphi 2008 for Win32 Freeandnil (REG);
End
\s matches any blank, including space, tabulation, page change, etc., equivalent to [\f\n\r\t\v] var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' expect Delphi 2008 for win32!
'; Reg.
RegEx: = ' \s '; Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
Back: Look forward to Delphi 2008 for win32!
Freeandnil (REG);
End {\f: page break \ n: newline character \ r: Carriage return \ t: Tab \v: Vertical tab}//\s matches any non-white space, equivalent to [^\f\n\r\t\v]//www.bianceng.cn VA
R Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' expect Delphi 2008 for win32!
'; Reg.
RegEx: = ' \s '; Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
Return: Freeandnil (REG);
End
\x matches hexadecimal ASCII var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' CodeGear Delphi'; Reg. RegEx: = ' \x61 '; The ASCII value of a is 97, which is the hexadecimal Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg. Subject);
return: Codege R Delphi freeandnil (REG);
End
I'm sorry Tperlregex can't match Unicode characters with \u or \u! // .
Matches any character other than a line break Var Reg:tperlregex;
BEGIN REG: = Tperlregex.create (nil); Reg. Subject: = ' expect ' + #10 + ' Delphi 2008 for win32! '; #10是换行符 Reg.
RegEx: = '. '; Reg.
Replacement: = '; Reg.
ReplaceAll; ShowMessage (Reg.
Subject);
{return:}
Freeandnil (REG);
End