Help for this page

Select Code to Download


  1. or download this
    my @dates;
    my string='All kinds of text 01-01-2003 Perl Party more text 01-01-200
    +4 Perl Party  and even more text 01-01-2005 Perl Party  and finally s
    +ome other date 01-01-2006';
    if ($string=~/([0-9]{2})-([0-9]{2})-([0-9]{4})\s$/ {my $date="$1\.$2\.
    +$3";
    push @dates, %date}}
    
  2. or download this
    my @substrings=split( /Perls\sin\sParty/, $string);
    for my $substring (@substrings) {
    ...
    my $date;
    $date="$1\.$2\.$3";
    print "There is a Perl Party on $date\n";}
    
  3. or download this
    if ($substring=~/([0-9]{2})-([0-9]{2})-([0-9]{4})\s$/) {
    my $date="$1\.$2\.$3";
    ...
    if ($string=~/$testdate/ {
    print "There is a Perl Party on $date\n";}
    }}