- Subject: Re: Problem with define_word
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Fri, 11 May 2007 01:40:15 -0400
Paul Lamb <pal@xxxxxxxxxxxxxx> wrote:
>Please note, in particular the line,
>
> define_word("-\\\"!#$%&'()*+,./0-9:;<=>?@A-Z[]^_a-z{|}~");
For slang-2, you will need to use:
define_word("-\\\\\"!#$%&'()*+,./0-9:;<=>?@A-Z[]^_a-z{|}~");
Without the extra set of backslashes, slang-2.0.7 will produce an
"invalid character class" error. The support for unicode necessitated
the introduction of character classes as a way of defining character
attributes. In your case, the define_word function is interpreting
the character combination \" as a character class, which is invalid.
The extra set of backslashes is necessary to quote the \ character.
The following character classes are supported:
\w matches a unicode "word" character, taken to be alphanumeric.
\a alphabetic character, excluding digits
\s matches whitespace
\l matches lowercase
\u matches uppercase
\d matches a digit
\\ matches a backslash
\^ matches a ^ character
Does this change solve the problem?
Thanks,
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2007 date index]
[2007 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]