AW: [Mono-devel-list] Regular expression problem with characters '{' and '}'
Eric Durand-Tremblay
erdut2 at ift.ulaval.ca
Thu Jan 15 11:37:15 EST 2004
Jörg Rosenkranz a écrit :
> Hello Eric,
>
> I'm trying to capture the braces as literal characters, i.e. in the
> string "{test}"
> and have forgotten to mask them. MS captures this string using
> "{\w+}", Mono throws an exception.
>
> Joerg.
>
> -----Ursprüngliche Nachricht----- Von: Eric Durand-Tremblay
> [mailto:erdut2 at ift.ulaval.ca] Gesendet: Do 15.01.2004 17:20
>
>
> Correct me if I am wrong, but the only usage of braces, as you
> say, is
> for quantifiers ;
> {n} {n,} {n,m} {n}? {n,}? {n,m}?
> where 'n' and 'm' are integer.
>
> What exactly are you trying to do. Capturing group are between
> ()Â Â and non-capturing (?: )
>
> I could be tempted to say that it is MS misbehaving but who am I
> to say
> so....
>
> Eric Durand Tremblay
> University Laval
>
Ok I understand why MS can accept this.
Just use \{\w+\}
Maybe MS do not need an escape character when not after [] but mono do
not check this case.
Anyway, this should work
Eric
More information about the Mono-devel-list
mailing list