The following typographical conventions are used in this book:
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, program elements such as variable or function names, values returned as the result of a regular expression replacement, and subject or input text that is applied to a regular expression. This could be the contents of a text box in an application, a file on disk, or the contents of a string variable.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
Regular●expression
›Represents a regular expression, standing alone or as you would type it into the search box of an application. Spaces in regular expressions are indicated with gray circles to make them more obvious. Spaces are not indicated with gray circles in free-spacing mode because this mode ignores spaces.
Replacement●text
»Represents the text that regular expression matches will be replaced within a search-and-replace operation. Spaces in replacement text are indicated with gray circles to make them more obvious.
Matched
text
Represents the part of the subject text that matches a regular expression.
A gray ellipsis in a regular expression indicates that you have to “fill in the blank” before you can use the regular expression. The accompanying text explains what you can fill in.
CR
, LF
, and CRLF
CR, LF, and CRLF in boxes represent actual line break
characters in strings, rather than character escapes such as
,
, and
. Such strings
can be created by pressing Enter in a multiline edit control in an
application, or by using multiline string constants in source code
such as verbatim strings in C# or triple-quoted strings in
Python.
The return arrow, as you may see on the Return or Enter key on your keyboard, indicates that we had to break up a line to make it fit the width of the printed page. When typing the text into your source code, you should not press Enter, but instead type everything on a single line.
This icon signifies a tip, suggestion, or general note.
This icon indicates a warning or caution.