Possessive quantifier
- ++
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
say ("aaa" =~ / a+ a /x ? 'YES' : 'NO'); # matched
say ("aaa" =~ / a++ a /x ? 'YES' : 'NO'); # does NOT match
Mainly for speed improvements
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
say ("aaa" =~ / a+ a /x ? 'YES' : 'NO'); # matched
say ("aaa" =~ / a++ a /x ? 'YES' : 'NO'); # does NOT match
Mainly for speed improvements