2010年5月11日 星期二

ULTRA EDIT 的正規搜尋

Regular Expressions in UltraEdit
UltraEdit SymbolUNIX SymbolFunction
%^Matches/anchors the beginning of line.
$$Matches/anchors the end of line.
?.Matches any single character except a newline character. Does not match repeated newlines.
* Matches any number of occurrences of any character except newline.
++Matches one or more of the preceding character/expression. At least one occurrence of the character must be found. Does not match repeated newlines.
++*Matches the preceding character/expression zero or more times. Does not match repeated newlines.
^\Indicates the next character has a special meaning. "n" on its own matches the character "n". "^n" (UE expressions) or "\n" (UNIX expressions) matches a linefeed or newline character. See examples below.
[ ][ ]Matches any single character or range in the brackets.
[~xyz][^xyz]A negative character set. Matches any characters NOT between brackets.
^b\fMatches a page break/form feed character.
^p\pMatches a newline (CR/LF) (paragraph) (DOS Files).
^r\rMatches a newline (CR Only) (paragraph) (MAC Files).
^n\nMatches a newline (LF Only) (paragraph) (UNIX Files).
^t\tMatches a tab character.
[0-9]\dMatches a digit character.
[~0-9]\DMatches a non-digit character.
[ ^t^b]\sMatches any white space including space, tab, form feed, etc., but not newline.
[~ ^t^b]\SMatches any non-white space character but not newline.
 \vMatches a vertical tab character.
[a-z_]\wMatches any word character including underscore.
[~a-z_]\WMatches any non-word character.
^{A^}^{B^}(A|B)Matches expression A OR B.
^\Overrides the following regular expression character.
^(...^)(...)Brackets or tags an expression to use in the replace command. A regular expression may have up to 9 tagged expressions, numbered according to their order in the regular expression.
^1\1Numerical reference to tagged expressions. Text matched with tagged expressions may be used in Replace commands with this format.
Note: ^ refers to the character '^' NOT Control Key + value.