these regexs below will pick up the name and dates (you'll need to put some
logic in with these too):

$_="name and date: Abate, Alfred 02.24.51 Date2: 09/21/00 blablabla";

/(\w*), (\w*)/;
print "name; $1 $2\n";
/(\d\d).(\d\d).(\d\d)/;
print "date: $1.$2.$3\n";
m#(\d\d)/(\d\d)/(\d\d)#;
print "date: $1/$2/$3\n";
/(\d\d)-(\d\d)-(\d\d)/;
print "date: $1-$2-$3\n";



Matt

-----Original Message-----
From: shil [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 11:06 AM
To: activeperl
Subject: regex??


Hi guys,
      I really have problem with this regex.Here I have the string
containing two dates separated by either ' / ' or ' . ' or ' - '. I have to
retrieve both the dates and string which comes before the first date and
after it.

Input
name and date: Abate, Alfred 02.24.51 Date2: 09/21/00 blablabla

output
Name =Abate Alfred
Date=02.24.51
Date2=09/21/00

Thanks for the help




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to