|
发表于 2007-3-3 20:16:55
|
显示全部楼层
正则还是要用Perl.......
[php]
[0 No.2081 huan@huan ~/tmp]$ cat foo
12 OCT 2006; Jcake willer <jacke_willer@163.com> libdeiododng-1.2.3.-r1.ebuild
added new information in this ebuild.
20 DEV 2006; Miachel Jordan <miachel_jordan@gmail.com> app-pda-2.1.10-r1.ebuild
modified some information in this ebuild.
[0 No.2082 huan@huan ~/tmp]$ perl -lne 'if ( /(^.*); ([^<]+) <(\S+)> (\S+)$/ ) {
print "Develope time: $1; Developer: $2; Email:<$3>; Product: $4" }' < foo
Develope time: 12 OCT 2006; Developer: Jcake willer; Email:<jacke_willer@163.com>; Product: libdeiododng-1.2.3.-r1.ebuild
Develope time: 20 DEV 2006; Developer: Miachel Jordan; Email:<miachel_jordan@gmail.com>; Product: app-pda-2.1.10-r1.ebuild
[0 No.2083 huan@huan ~/tmp]$
[/php] |
|