You can get this information from regx by typing

> regx help regex

use "regx help matching" and "regx help replacing" for more detail

.       - Any character         ^   Start of line     $ End of line

?       - 0 or 1            ab?c        Matches "abc" and "ac"
+       - 1 or more         ab+c        Matches "abc", "abbc", etc.
*       - 0 or more         ab*c        Matches "ac", "abc", "abbc", etc.
{n}     - exactly n         ab{4}c      Matches "abbbbc"
{x,y}   - Between x and y   ab{2,4}c    Matches "abbc", "abbb", and "abbbb"
{n,}    - n or more         ab{3,}c     Matches "abbbc", "abbbbc", etc.

|       - Alternation           cat|dog     "cat" or "dog"
()      - Subexpression         (cat)?      Optional "cat"
[]      - Character class       [a-l1-5]    Any of abcdefghijkl12345
[^]     - Inverted class        [^p-z]      Any character except pqrstuvwxyz
[-[]]   - Class subtraction     [a-h-[c-f]] Any of abgh

\d \D       Is/Is-not a number digit
\w \W       Is/is-not a word character (letter or digit)
\s \S       Is/is-not whitespace
\b \B       Is/is-not on a word boundary
\p{}, \P{}  Is/is-not in the named Unicode category or blocks

(regex)                 - Unnamed (numbered) capture group
(?<name>regex)          - Named capture group
\#, \k<name>            - Backreference

(?=regex)  (?!regex)    - Positive, negative lookahead
(?<=regex) (?<!regex)   - Positive, negative lookbehind

(?(name)y|n)            - Alternation on backreference to name
(?(pattern)y|n)         - Alternation on zero-width expression

(?#)                    - Inline comment

(?<n1-n2>)              - Balancing group

(?!imnsx-imnsx)         - Options i=ignore case, n=named groups only, x=ipw

Last edited Sep 19, 2012 at 8:28 PM by SethMorris, version 2


No comments yet.