[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: conditional replace
- From: "Jerome Vuarand" <jerome.vuarand@...>
- Date: Tue, 18 Sep 2007 16:46:28 -0400
Thomas A. Schmitz wrote:
> On Sep 18, 2007, at 5:31 AM, Patrick Donnelly wrote:
> subs = {
> a = "α",
> b = "β"
> }
>
> etc. But as soon as I try to stick some non-alphanumerical characters
> in there like so:
>
> >~h| = ᾖ
>
> I get errors. Is it impossible to have keys to an array that are of
> this form, or am I missing something obvious?
With that syntax, the right string must be quoted, and the left string must be a valid Lua symbol. You cannot put characters '>', '~' in a Lua symbol. Precisely which characters are authorized in the symbols is local dependent.
You can also try this alternative syntax:
subs = {
[">~h|"] = "ᾖ"
}