[1263] in Coldmud discussion meeting
Re: [COLD] match_regexp bug...
daemon@ATHENA.MIT.EDU (Mon Mar 31 17:21:43 1997
)
Date: Mon, 31 Mar 1997 14:14:22 -0800 (PST)
From: Brian Buchanan <brian@wasteland.calbbs.com>
To: Jeff Kesselman <jeffk@tenetwork.com>
cc: coldstuff@cold.org
In-Reply-To: <3.0.32.19970331134545.00685554@mail.tenetwork.com>
On Mon, 31 Mar 1997, Jeff Kesselman wrote:
> Date: Mon, 31 Mar 1997 13:45:48 -0800
> From: Jeff Kesselman <jeffk@tenetwork.com>
> To: coldstuff@cold.org
> Subject: [COLD] match_regexp bug...
>
> match_regexp appears to get confused if there are square brackets in the
> string to be matched. My matching against the string "Class: []" throws a
> "umatched []" error. In all other cases the match works fine.
>
From the error you got, it looks like you did something like:
match_regexp("foo","Class: []");
[ and ] are special characters in regexps and expect a list of valid
characters or character ranges between them. To match against literal
[]'s, quote them with backslashes, e.g.:
match_regexp("foo","Class: \[\]");
- Brian