Please enable JavaScript to view this site.

Commands sometimes use regular expressions, which must correspond to the Perl syntax. Usually, regular expressions are used as search strings. However, it is also possible to replace expressions.

 

Explanations and examples can be found on the internet, for example under

https://en.wikipedia.org/wiki/Regular_expression

 

 

empty

Note:

The following characters have a special function in regular expressions:

. ^ $ * + ? () [ ] { } < > \ |

If these are to be used as "normal" characters, they must be marked (escaped) by prefixing them with a \ (see following table).

 

Listing of characters with special function and their effect

 

Character

Effect/use

any

stands for the character, unless specified otherwise.

.

stands for any single character other than a line or paragraph break. For example, the search term "Schmi.t" returns both "Schmitt" and "Schmidt".

^

will only find the search term if it is at the beginning of the paragraph. Special contents such as blank fields and frames anchored to characters at the beginning of a paragraph are ignored. Example "^Peter".

^.

finds the first character of a paragraph.

$

finds the search term only if it is at the end of the paragraph. Special contents such as blank fields and frames anchored to characters at the end of a paragraph are ignored. Example "Peter$".

only matches the end of a paragraph. This makes it possible to search for and replace paragraph breaks.

^$

finds an empty paragraph.

*

finds none or more of the characters before the "*". For example, the search term "Ab*c" returns the entries "Ac", "Abc", "Abbc", "Abbbc" and so on.

+

finds, one or more of the characters before the "+". For example, "AX.+4" will find "AXx4", but not "AX4".

It always finds the longest possible string corresponding to the search pattern in a paragraph. If the paragraph contains the string "AX 4 AX4" the entire expression is highlighted.

?

finds none or one of the characters before the "?". For example, "texts? will find" "Text" and "texts" and "x(ab|c)?y" will find "xy", "xaby" or "xcy".

\

The search function interprets the special character after the "\" as a normal character and not as a regular expression (except for the combinations \n, \t, \> and \<). For example, when searching for "no\." "no." will be found, but not "none" "".

\n

in the "Search for" field stands for a line break inserted with Shift+Enter. In the field "Replace with" \n stands for a paragraph break.

Line breaks are replaced by paragraph breaks by entering \n in the "Search for" and "Replace with" fields.

\s

stands for a space. This expression can also be used in the "Replace with" field.

\t

stands for a tab character. This expression can also be used in the "Replace with" field.

\b

finds a word boundary. For example, "\bbook" will find "bookcase", but not "textbook", whereas "book\b" will find "textbook", but not "bookcase".

& or $0

adds the string found by the search criteria in the "Search for" field to the term in the "Replace with" field.

For example, if window is entered in "Search for" and "&frame" in "Replace with," "the" word "window" is replaced by "window frame".

Furthermore the attributes or the format of the search term found by the search criteria can be changed with the expression "&" in the field "Replace with".

[abc123]

stands for one of the characters in brackets.

[a-e]

stands for any character between a and e, including both start and end characters. The characters are arranged according to their identification number.

[a-eh-x]

stands for any character in the letter range a-e and h-x.

[^a-s]

stands for everything that is not between a and s.

\uXXXX

stands for a character based on its four-digit hexadecimal unicode (XXXX).

The code of some characters depends on the font

\UXXXXXXXX

for insignificant characters with eight-digit hexadecimal Unicode (XXXXXXXX).

|

finds terms that appear before the "|" as well as those that appear after the "|"."this|that" finds both "this" and "that".

{2}

indicates how often the character must appear before the opening parenthesis. For example, the search term "in{2}" returns the word "inn".

{1.2}

specifies both the minimum and maximum number of times the character can appear in front of the opening parenthesis. "in{1,2}" finds and selects both "in" and "inn".

{1,}

indicates how often the character must appear before the opening parenthesis in the word as a minimum. Example: The search term "in{2,}" finds "inn", "innn" and "innnn".

( )

in the field "Search for":

The characters in brackets are used as a reference. The first reference in the current expression can then be referenced with "\1", the second with "\2" and so on.

For example, if a text contains the number 13487889, a search with the expression (8)7\1\1 would find "8788".

() can also be used to group search text. The search text "a(bc)?d" thus finds "ad" or "abcd".

 

In the field "Replace with":

To replace references, $ (dollar) is used instead of \ (backslash). To replace the entire string found, $0 is used.

[:alpha:]?

stands for an alphabetical character. Use [:alpha:]+ to find one.

[:digit:]?

stands for a decimal digit. Use [:digit:]+ to find a digit.

[:alnum:]?

stands for an alphanumeric character ([:alpha:] and [:digit:]).

[:space:]?

stands for a space character (but no other wildcard character).

[:print:]?

stands for a printable character.

[:cntrl:]?

stands for a non-printable character.

[:lower:]?

Stands for a lower-case character if upper/lower-case is selected in the options.

[:upper:]?

Stands for an upper-case character if upper/lower-case is selected in the options.

Source: Wikipedia

 

Examples

max\.mustermann@test\.tld

stands for the email address max.mustermann@test.tld

 

@test\.tld

stands for all email addresses from the domain test.tld

 

@test\..+

stands for all email addresses from the domain test.*, for example test.uk, test.com, test.local but also test.local.de and so on.

 

@test\..{3,4}$

stands for all email addresses from the domain test.* with two or three-digit country domains, e.g. test.ch, test.com, but not test.a or test.abcd and so on.

 

@.*\.test\.tld

stands for all email addresses from the domain test.tld and its sub-domains, including ch.test.tld, de.test.tld local.test.tld and so on.

 

(@.*)(\.waste\.tld$)

In this more complex example, every email address ending in .waste.tld is found. The $ character at the end of the expression means that no further characters may follow .waste.tld in the examined email address. The complete part of the email address, which is before the ending .waste.tld, is defined by the expression @.*.

The individual expressions are delimited by the inclusion in brackets. Thus, the parenthesised parts can be called up by variables. In the example, everything in (@.*) could be retrieved with the variable $1.

In the concrete example, using $1 would cut off all email addresses ending in .waste.tld.

This, for example, for the originally read address "test@customer.tld.waste.tld", the variable $1 would contain "test@customer.tld".

 

\[confidential\]|\<crypt\>

reacts to both the expression [confidential] and <crypt> (OR link). This enables, for example, the use of multiple keywords for encryption.

 

(?i)john\.doe

(?i) does not differentiate between upper and lower cases in the expression john\doe.

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC