Try this:
print "Content-type:text/html\n\n";
$i="name and date: Abate, Alfred 02.24.51 Date2: 09/21/00 blablabla";
$i=~/(\w+),\s*(\w+)\s+([\d\.-\/]+)\s+date2:\s*([\d\.-\/]+)/i;
($fname, $lname, $date1, $date2) = ($1, $2, $3, $4);
print "name: $fname $lname<br>\n";
print "date1: $date1<br>\n";
print "date2: $date2<br>\n";
-----Original Message-----
From: shil [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 5: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