2009年7月24日星期五

[PerlChina] Re: 请教一个正则表达式的问题

看看你引用的那段的前一段:
The numbered match variables ($1, $2, $3, etc.) and the related
punctuation set ($+, $&, "$`", "$'", and $^N) are all
dynamically
scoped until the end of the enclosing block or until the next
successful match, whichever comes first. (See "Compound
Statements" in
perlsyn.)


On 7月24日, 下午10时13分, Lee Duhem <lee.du...@gmail.com> wrote:
> 2009/7/24 Cheese <cheese...@126.com>:
>
> > 我的跟Yuan Jiang一样
> > Perl 5.10.0
>
> > 不要轻易说有Bug.
>
> 这是 perl 5.10.0 的 perlre 中的原话:
>
> NOTE: Failed matches in Perl do not reset the match variables,
> which makes it easier to write code that tests for a series of more
> specific cases and remembers the best match.
>
> 然后再对比 perl 5.10.0 和 perl 5.8.8 的不同行为,难道你不怀疑这是个 bug?
>
> lee
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

没有评论: