Check for 4-8 a's : Pattern matching « Regular Expression « Perl
- Perl
- Regular Expression
- Pattern matching
Check for 4-8 a's
#!/usr/bin/perl -w
foreach $patt (@ARGV) {
# Check for 4-8 a's.
if ($patt =~ /a{4,8}/) {
print "\tFound 4-8 a's in \"$patt\".\n";
}
}
Related examples in the same category