2009年8月27日星期四

[PerlChina] Re: 用split以空格分割字串时,遇到英文句子该怎么办?

试试这个
use Text::ParseWords;
nested_quotewords('\s+', 0, $text);

2009/8/28 蓝天下云层上 <imx365ster@gmail.com>
$text = qq~词1 词2 "dd df xx" 中华~;

@value = split(/ /, $text);

这里"dd df xx" 应该做为一个完整的部分,可这个split中的规则该怎么写呢?



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

没有评论: