www.perl.com
Perl Programming
Regular Expressions
  • Match boundaries between types of characters
    • ^ matches the start of the string
    • $ matches the end of the string
    • \b matches a word boundary

        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/