TextCrawler Pro 3 Manual |
|||||||
|
|||||||
(c)2014 DigitalVolcano Software Ltd.
|
|
Position Matching
|
^
|
Only match the beginning of a file/line
|
$
|
Only match the ending of a file/line
|
\A
|
The match must occur at the start of the string.
|
\b
|
Matches any word boundary
|
\B
|
Matches any non-word boundary
|
\Z
|
The match must occur at the end of the string or before \n at the end of the string.
|
\z
|
The match must occur at the end of the string
|
\G
|
The match must occur at the point where the previous match ended.
|
|
|
|
Literals (for matching special characters)
|
Alphanumeric
|
Matches alphabetical and numerical characters literally.
|
\n
|
Matches a new line
|
\f
|
Matches a form feed
|
\r
|
Matches carriage return
|
\t
|
Matches horizontal tab
|
\v
|
Matches vertical tab
|
\a
|
Matches the bell character
|
\?
|
Matches ?
|
\e
|
Matches an escape
|
\*
|
Matches *
|
\+
|
Matches +
|
\.
|
Matches .
|
\|
|
Matches |
|
\{
|
Matches {
|
\}
|
Matches }
|
\\
|
Matches \
|
\[
|
Matches [
|
\]
|
Matches ]
|
\(
|
Matches (
|
\)
|
Matches )
|
\xxx
|
Matches the ASCII character expressed by the octal number xxx.
|
\xdd
|
Matches the ASCII character expressed by the hex number dd.
|
\uxxxx
|
Matches the ASCII character expressed by the UNICODE xxxx.
|
|
Character Classes
|
[xyz]
|
Match any one character enclosed in the character set.
|
[^xyz]
|
Match any one character not enclosed in the character set.
|
[first-last]
|
Range - matches any character in range first-last.
|
.
|
Match any character except \n.
|
\w
|
Match any word character. Equivalent to [a-zA-Z_0-9].
|
\W
|
Match any non-word character. Equivalent to [^a-zA-Z_0-9].
|
\d
|
Match any decimal digit. Equivalent to [0-9].
|
\D
|
Match any non-decimal digit. Equivalent to [^0-9].
|
\s
|
Match any whitespace character. Equivalent to [ \t\r\n\v\f].
|
\S
|
Match any non-whitespace character. Equivalent to [^ \t\r\n\v\f].
|
|
Repetition and Grouping
|
{x}
|
Match exactly x occurrences of a regular expression.
|
{x,}
|
Match x or more occurrences of a regular expression.
|
{x,y}
|
Matches x to y number of occurrences of a regular expression.
|
?
|
Match zero or one occurrences. Equivalent to {0,1}.
|
*
|
Match zero or more occurrences. Equivalent to {0,}.
|
+
|
Match one or more occurrences. Equivalent to {1,}.
|
|
Alternation & Grouping
|
()
|
Grouping a clause to create a clause. May be nested. "(ab)?(c)" matches "abc" or "c".
|
|
|
Alternation combines clauses into one regular expression and then matches any of the individual clauses. "(ab)|(cd)|(ef)" matches "ab" or "cd" or "ef".
|
$1 - $9 (In replace expression)
|
Reference a group.
|
|
Backreferences
|
()\n
|
Matches a clause as numbered by the left parenthesis
|
|
In Replace Strings (Regular expression mode only)
|
\r
|
Carriage Return
|
\n
|
Newline
|
\t
|
Tab
|
\\
|
Slash character
|
$1 - $9
|
Reference a group captured in Regular Expression
|