pretty easy. . . Just add the colon to the character class. . .
$line = "fordGID=54097";
$line2 = "fordGID:54097";
($match,$data)=split(/[=:]/,$line);
print "line 1 is $match, $data";
($match,$data)=split(/[=:]/,$line);
print "line 2 is $match, $data";
Sam Gardner
GTO Application Development
Keefe, Bruyette & Woods, Inc.
212-887-6753
-----Original Message-----
From: Ella Cai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 01, 2004 4:16 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: a question for split function in perl
Our codes is like this:
$line = "fordGID=54097";
($match,$data)=split(/[=]/,$line);
Right now, sometime $line = "fordGID:54097";
I would like to know can split function support regular _expression_ like if it has either "=" or ":"?
Thanks
Lixin
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs