Re: [pcre-dev] an unfamiliar syntax?

Page principale
Supprimer ce message
Auteur: Philip Hazel
Date:  
À: Zack Weinberg
CC: 张志凯, pcre-dev
Sujet: Re: [pcre-dev] an unfamiliar syntax?
On Tue, 23 Dec 2008, Zack Weinberg wrote:

> > .... \s*\x3a\s*{?\s*B973393F-27C7-4781-877D-8626AAEDF119\s*}?\s*...
> >
> > what does the {?s*....} part mean in this re? i can't find any docs
> > explaining this(what i know about {} is it can be used with quantifier
> > or Unicode option). would you guys kindly tell me? thanks a lot.
>
> I think, in this context, { is not a metacharacter, so {? just matches
> either "" or "{", and then \s* is the usual notation for optional
> whitespace.


Yes, that's right. It is compatible with Perl.

Philip

--
Philip Hazel