Trailing Modifiers
After the last delimiter in your regular expression you can place a number of optional modifier characters that affect how the expression operates. Table 7-1 lists the more commonly used ones.
Table 7-1. Regular expression modifiers
Modifier |
Description |
---|---|
|
Make the match global; that is, keep looking for additional matches after the first one has been found. |
|
Match case-insensitively, such that the search
pattern |
|
Treat the string as multiple lines. More specifically, let the
|
|
Compile the regular expression search pattern only once. If the
search pattern contains any variables whose contents change after the
first time the expression is compiled, those changes won’t be
reflected in the regular expression. In effect, the
|
|
Treat the string as a single line, even if it isn’t. Specifically,
let the special character |
|
Allow the use of regular expression ... |
Get Perl for Web Site Management now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.