| Perl Programming | ||
|---|---|---|
| Regular Expressions | ||
my $string = "Did the fox jump over the dogs?";
print "1: $string\n" if $string =~ m/^[Yy]/; # no match
print "2: $string\n" if $string =~ m/\?$/; # match
print "3: $string\n" if $string =~ m/the\b/; # match
|
||
| Previous | http://stuff.mit.edu/iap/perl/ | Next |