[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Help with RegEx



#!perl

  $test = <<"EOF";
I have to extract dates from a text, store them into an array and then use
AppleScript to save them into a FileMaker Pro database.
The dates in the text are in the following format: mm/dd/yy.

I have tried some expressions, but since I am not experienced, Perl returns
the entire line that contains the date.

If you can help, please let me know.
EOF


  if ($test =~ /(..)\/(..)\/(..)/) {
      $date = "$1\/$2\/$3";
      print $date;
  }

__END__


David Seay
http://www.mastercall.com/g-s/




# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org