Author: Zack Weinberg Date: To: 张志凯 CC: pcre-dev Subject: Re: [pcre-dev] an unfamiliar syntax?
2008/12/22 张志凯 <zhangzhikai@???>: >
> i am studying snort rules and found some pcre expressions i can't
> understand, like:
>
> .... \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.