[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Special characters in patterns: what about \?
- From: Tony Finch <dot@...>
- Date: Wed, 27 Jun 2007 22:26:55 +0100
On Wed, 27 Jun 2007, Mauro Iazzi wrote:
> The backslash is still considered escape at string constructor level.
> It is discarded before it arrives to gsub. Then gsub does not even
> know it was there and interprets the ^ as negating next char (it needs
> at least one). Anytime you want a backslash in a string just insert it
As an aside, I have to say that the idea of using % for escaping in Lua
patterns is a pretty neat way of reducing the multi-layer escape problem
that's common in other languages (such as emacs lisp and exim configs).
f.a.n.finch <firstname.lastname@example.org> http://dotat.at/
SOUTHEAST ICELAND: NORTH 6 OR 7, OCCASIONALLY GALE 8 AT FIRST. ROUGH OR VERY
ROUGH. SHOWERS. GOOD.