yangfeng@sbuild:~/perl$ cat re.pl
#!/usr/bin/perl
@t = qw{ e666[gx].mk, zprojects/e666[gx]/makefile.mk,e666/[op]/makefile.mk,e666[gx]/makefile.mk};
foreach $mm ( @t )
{
print "$mm\n" if ($mm =~m/.*\/(\w+)(\[\w+.*\])?\/(\w+).mk/);
}
yangfeng@sbuild:~/perl$ ./re.pl
zprojects/e666[gx]/makefile.mk,e666/[op]/makefile.mk,e666[gx]/makefile.mk
yangfeng@sbuild:~/perl$
阅读(1679) | 评论(0) | 转发(0) |