This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlre: regularise list items
[perl5.git] / pod / perlrequick.pod
index 008ef33..d72bd2b 100644 (file)
@@ -233,6 +233,11 @@ character and a non-word character C<\w\W> or C<\W\w>:
 In the last example, the end of the string is considered a word
 boundary.
 
+For natural language processing (so that, for example, apostrophes are
+included in words), use instead C<\b{wb}>
+
+    "don't" =~ / .+? \b{wb} /x;  # matches the whole string
+
 =head2 Matching this or that
 
 We can match different character strings with the B<alternation>
@@ -495,6 +500,14 @@ the matched substrings from the groupings as well:
 Since the first character of $x matched the regex, C<split> prepended
 an empty initial element to the list.
 
+=head2 C<use re 'strict'>
+
+New in v5.22, this applies stricter rules than otherwise when compiling
+regular expression patterns.  It can find things that, while legal, may
+not be what you intended.
+
+See L<'strict' in re|re/'strict' mode>.
+
 =head1 BUGS
 
 None.