Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a little bit about :sigspace
  • Loading branch information
Mouq committed Jul 23, 2014
1 parent 11557f7 commit 5837150
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/Language/regexes.pod
Expand Up @@ -332,4 +332,22 @@ TODO
TODO
=head1 Adverbs
TODO
=head2 Sigspace
The B<C<:sigspace>> or B<C<:s>> adverb makes whitespace significant in a regex.
=begin code :allow<B>
say so "I used Photoshop®" ~~ m:i/ photo shop /; # True
say so "I used a photo shop ~~ m:iB<:s>/ photo shop /; # True
say so "I used Photoshop®" ~~ m:iB<:s>/ photo shop /; # False
=end code
C<m:s/ photo shop /> acts just the same as if one had written C<m/ photo <ws>
shop <ws> />. By default, C<< <ws> >> makes sure that words are seperated, so
C<a b> and C<^&> will match C<< <ws> >> in the middle, but C<ab> won't.
=end pod

0 comments on commit 5837150

Please sign in to comment.