2009年5月6日星期三

[PerlChina] Re: metacharacters 的屏蔽

这个好像是这样的,不过,我处理的东西好像不会遇见这种情况。

On 5月5日, 上午11时43分, Michael Zeng <galaxy2...@gmail.com> wrote:
> 是啊, \Q \E 就是 等于 quotemeta
>
> 不过 要是 里面 含有 \E 的话, 就不太一样
>
> On 5/5/09, mark <zhusheng...@163.com> wrote:
>
>
>
>
>
>
>
> > 我去查资料,发现有两种方式:(1)就是quotemeta函数:Returns the value of EXPR with all
> > non-"word" characters backslashed. (That is, all characters not
> > matching /[A-Za-z_0-9]/ will be preceded by a backslash in the
> > returned string, regardless of any locale settings.) This is the
> > internal function implementing the \Q escape in double-quoted strings
> > (2) 就是,$query='c:\zhu\perl\'
> > m/\Q$query\E/。
>
> > On 5月5日, 上午9时27分, agentzh <agen...@gmail.com> wrote:
> > > 2009/5/4 mark <zhusheng...@163.com>
>
> > > > 有没有人知道,屏蔽元字符(即将元字符当作普通字符处理)。
>
> > > quotemeta?
>
> > > -agentzh
>
> --
> Yours Sincerely
> Zeng Hong- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

没有评论: