IMPORTANT!
Non-alphanumeric symbols in search expressions must be escaped with a
backslash. For example, if you need to find a symbol # using regular expressions, you must type \#. Otherwise, symbols are treated as regular expression operators.
Note:
Literal switches are case-sensitive! For example, \s
matches whitespace, while \S matches non-whitespace.
Repeat qualifiers (@,#,*,+) can be applied (for examlpe: .+) to match text segments as large as 2 Mb or less.
Note:
Greedy means matching this condition as much as possible, disregarding further coinciding or alike conditions. See more detailed description of the greedy and non-greedy modes in topic Using Regular Expressions.
| Expression | Description. |
|---|---|
^ |
Match the beginning of file. HandyFile Find And Replace searches the file as if it is a single line. This allows to search for the line-breaking characters and text blocks, manipulate and replace them without any hassle. To insert any text in the beginning of a file, type: ^. in the Find What field and \0text_to_insert in the Replace With field. |
$ | Match the end of file. |
. | Match any character. |
[ ] | Match characters in set. Specify set (e.g. [aghet2]) or range (e.g. [A-Z]). |
[^ ] | Match characters not in set (e.g. [^A-Z]). |
? | Match previous pattern 0 or 1 times (greedy). |
| | Match previous or next pattern. |
@ | Match previous pattern 0 or more times (non-greedy). |
# | Match previous pattern 1 or more times (non-greedy). |
* | 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 for further referencing and use. |
\ | Quote next character (only of not a-z; e.g. "\>" designates symbol ">"). |
< | Match beginning of a word. |
> | Match end of a word. |
\t | Match 0x09 (tab). |
\e | Match escape (^E). |
\s | Match whitespace (tab, space, CR, LF). More... |
\S | Match non-whitespace. |
\w | Match word character. |
\W | Match non-word character. |
\d | Match digit character. |
\D | Match non-digit character. |
\U | Match uppercase. |
\L | Match lowercase. |
\C | Match case sensitively from here on. |
\c | Match ignoring the case from here on. |
| \xNN | Character with hexadecimal value of NN, where N=[0-9A-F]. |
| \dNNN | Character with decimal value of NNN, where N=[0-9]. |
| \oNN | Character with octal value of NNN, where N=[0-7]. |
| Expression | Description. |
|---|---|
\0 | Place whole found text. |
\# | Place contents of the stored group numbered by the "#" [groups are defined by braces (...) in the search expression]; #=[1-9]. |
\t | Place tab character. |
\u | Make next character uppercase. |
\l | Make next character lowercase. |
\U | Force further output uppercase. |
\L | Force further output lowercase. |
\E | Turn off case transformation (after the use of \U or \L) |
\f | Insert current file name and extension (file.ext). |
\F | Insert current file name only, without extension (file). |
\X | Insert current file extension (.ext). More... |
\R | Insert a random 8-digit number. For example: 267124D2. |
\S | Insert a random 8-digit number that remains constant within a single replace expression. For example, the expression id="\S" onClick="openPageId('\S')"
might insert
id="267124D2" onClick="openPageId('267124D2')" |
\Zhe | Converts the next symbol to numeric HTML entity. |
\ZhE | Turns on the ASCII - to - HTML Entity conversion. Makes all further output converted to numeric HTML entities. For example, the operator
\ZhEMyStringwill insert MyString |
\Zhx | Turns off the ASCII - to - HTML Entity conversion previously initialised by \ZhE. |
\P[h]:"file_path_name" | Executes the path name resolver. Very often your files (for example, HTML pages) are stored in different folders and use reference to one file in some other folder (for example, CSS file). This operator allows to insert a path name of the referenced file relative to a processed file, given a fully-qualified path and name of the referenced file. \P operator uses backslash as the path part separator.
\Ph operator (h stands for HTML mode) uses forward slash.If the given path name cannot be converted to a relative path, the provided path name is inserted. See Remarks for example. |
\Pc[h]:"directory_path" | Similar to operator \P.
Executes the path name resolver on the currently processed file. Inserts path to the current
file relative to the provided directory.For example, if the current file is c:\dir1\dir2\dir3\file.ext and the directory_path is c:\dir1\dir2 ,
the operator \Pc:"c:\dir1\dir2" will insert .\Dir3\file.ext\Pc operator uses backslash as the path part separator.
\Pch operator (h stands for HTML mode) uses forward slash.If conversion fails, the current file path name is inserted. |
\Pd[h]:"ref_dir_path" |
Executes the reverse path name resolver on the directory of the currently processed file.
Inserts path to the provided directory relative to the directory of the current file. For example, if the current file directory is c:\dir1\dir2\dir3 and the
ref_dir_path is c:\dir1 ,
the operator \Pd:"c:\dir1" will insert ..\..\Pd operator uses backslash as the path part separator.
\Pdh operator (h stands for HTML mode) uses forward slash.If conversion fails, the current file path is inserted. In all cases, no trailing slash is appended. |
\xNN | Insert character with hexadecimal value of NN, where N=[0-9A-F]. |
\dNNN | Insert character with decimal value of NNN, where N=[0-9]. |
\oNN | Insert character with octal value of NNN, where N=[0-7]. |
For example, you are processing files and folders in C:\MyWeb\HTML\Catalog. You want to insert a reference to a CSS file style.css stored in the folder C:\MyWeb\HTML.
You could write the following replace expression:
<LINK REL=stylesheet href=\"\ph:"c:\\myweb\\html\\style.css"\" TYPE="text/css">
This will insert the following text in HTML files in C:\MyWeb\HTML\Catalog:
<LINK REL=stylesheet href="../style.css" TYPE="text/css">
and the following text in HTML files in C:\MyWeb\HTML\Catalog\dir1\dir2:
<LINK REL=stylesheet href=&style.css" TYPE="text/css">
Note!
Root parts of path names of both a referenced and processed file must be the same. It means that they must have a common drive letter.