| Perl Programming | ||
|---|---|---|
| Regular Expressions | ||
my $string = "Did the fox jump over the dogs?";
print "1: $string\n" if $string =~ m/(fox){2}/; # "foxfox"
print "2: $string\n" if $string =~ m/(the\s).*\1/; # matches
|
||
| Previous | http://stuff.mit.edu/iap/perl/ | Next |