[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Problem matching on [.]
- From: roberto@... (Roberto Ierusalimschy)
- Date: Tue, 15 May 2007 10:25:51 -0300
(Answering two messages...)
> Moving onto page 181, the book says:
> "A char-set allows you to create your own character classes,
> combining different character classes and single characters between
> square brackets".
> Thus the regular expression "[.]" should match any single character.
> It consists of a char-set, and inside the char-set is a character
> class, namely ".". If you want to match a period, you should really
> use this: "[%.]".
Yes, the book explanation is at least loose, if not wrong. Thanks for
> It's my understanding that the reference manual is authoritative,
> while PiL is not.
Sure. PiL itself says so:
"Moreover, the manual is the authoritative document about Lua. Wherever this book disagrees with the manual, trust the manual."