Zero width loop : Loop « Regular Expression « Perl
- Perl
- Regular Expression
- Loop
Zero width loop
#!/usr/bin/perl
use warnings;
use strict;
my $text = "this is a test";
while ($text =~ /(?=(.))/g) {
print "[$1]";
}
Related examples in the same category