A regular expression is a search string that contains normal text plus special characters for advanced searching.
As an example, you can find any digit by using the regular expression "[0-9]". Similarly you can find any matching character that is not a digit by using the regular expression "[^0-9]".
EditPlug supports regular expressions in Find, Replace, Find in Files, and Multi Line Find and Replace dialogs.
. | Matches any character |
| | Either expression on the left and right side matches target string. For example, "a|b" matches "a" and "b". |
[] | Any of the enclosed characters may match the target character. For example, "[ab]" matches "a" and "b". "[0-9]" matches any digit. |
[^] | None of the enclosed characters may match the target character. For example, "[^ab]" matches all character except "a" and "b". "[^0-9]" matches a non-digit character. |
* | Character to the left of asterisk in the expression should match 0 or more times. For example "ba*" matches "b", "ba" and "baa". |
+ | Character to the left of plus sign in the expression should match 1 or more times. For example "ba+" matches "ba" and "baa" but not "b". |
? | Character to the left of question mark in the expression should match 0 or 1 time. For example "ba?" matches "b" and "ba" but not "baa". |
^ | Expression to the right of ^ matches only when it is at the beginning of line. For example "^B" matches an "B" that is only at the beginning of line. |
$ | Expression to the left of $ matches only when it is at the end of line. For example "a$" matches an "a" that is only at the end of line. |
() | Affects the evaluation order of the expression and they are used for tagged expressions. |
\t | Tab character |
\n | New line |
\ | Escape character. If you want to find the "\" character, you should use "\\". |
In the multi line replace dialog, tagged expressions can be used and are enclosed by () brackets. Tagged expressions can be referenced by $0, $1, $2, $3, etc. $0 represents the entire string that was matched. $1 indicates the first tagged expression, $2 is the second, etc.