How to Use Regular Expressions
A regular expression is a search string that uses special characters to match patterns of text. You can use them as with the Find command, as with the Replace command in conjunction with replacement expressions.
Summary of regular expressions:
Operator | Description |
---|---|
^ | Match the beginning of line |
$ | Match the end of line |
, | Match any character |
[] | Match characters in set |
[^] | Match characters not in set |
? | Match previous pattern 0 or 1 times (greedy) |
| | Match previous or next pattern |
* | Match previous pattern 0 or more times (greedy) |
+ | Match previous pattern 1 or more times (greedy) |
{} | Group characters to form one pattern |
() | Group and remember |
\ | Quote next character (only of not a-z) |
\< | Match beginning of a word |
\> | Match end of a word |
\x## | Match character with ASCII code # (hex) |
\x#### | Match Unicode character with ASCII code ## (hex) |
\o### | Match ascii code |
\a | Match \a |
\r | Match 0x13 (cr) |
\b | Match \b (but only inside a character class declaration) |
\t | Match 0x09 (tab) |
\f | Match \f |
\v | Match \v |
\n | Match 0x10 (lf) |
\e | Match escape (^E) |
\s | Match white space (cr/lf/tab/space) |
\S | Match nonwhite space (!\S) |
\w | Match word character |
\W | Match non-word character |
\d | Match digit character |
\D | Match non-digit character |
\u | Match uppercase |
\U | Match non-uppercase |
\l | Match lowercase |
\L | Match non-lowercase |
\C | Match case sensitively from here on |
\c | Match case ignore from here on |
Other operators... |
HippoEDIT uses regular expression engine from BOOST library. So further information about possible flags, syntax and examples can be found on BOOST website.
For examples of regular expression you can check Regular Expression Library
For testing your regular expression try this great resource: Regexr
A desktop version of this tool is also available: Desktop Regexr