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 30c3238..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>