Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
.NET has been built with a Traditional NFA regex engine, so all the important NFA-related lessons from Chapters 4, 5, and 6 are applicable. Table 9-1 on the facing page summarizes .NET’s regex flavor, most of which is discussed in Chapter 3.
Certain aspects of the flavor can be modified by match modes ( 110), turned on via option flags to the various functions and constructors that accept regular expressions, or in some cases, turned on and off within the regex itself via ?(?mods–mods)? and ?(?mods–mods:···)? constructs. The modes are listed in Table 9-2 on page 408.
In the table, “raw” escapes like ?\w? are shown. These can be used directly in VB.NET string literals ("\w"), and in C# verbatim strings (@"\w"). In languages without regex-friendly string literals, such as C++, each backslash in the regex requires two in the string literal ("\\w"). See “Strings as Regular Expressions” ( 101).