Re: hilight -regexp: using zero-width negative look-ahead assertion?
David Pashley <[email protected]> Wed, 26 Dec 2007 08:42:21 +0000
| Newsgroups | gmane.network.irc.irssi.user |
|---|---|
| Message-ID | <[email protected]> |
On Dec 26, 2007 at 00:08, Alexander Thomas praised the llamas by saying: > I would like to make a hilight that reacts on anything containing > "foo", except when it is followed by "bar". > For instance, "I pity the fool" should produce a hilight, but "I pity > the foobar" not. > The normal way to do this in a perl regex is /foo(?!bar)/ (called a > "zero-width negative look-ahead assertion" in the perlre manpage), but > if I use "/hilight -regexp foo(?!bar)", irssi says that the regex is > "[INVALID!]" > So how do I use a ZWNLAA in irssi? > Unfortunately, it looks like you can't. Irssi uses the POSIX regex library built into the libc library, which, as far as I'm aware, doesn't have these advanced features. I'm sure patches will be welcome that make use of PCRE if it is available. -- David Pashley [email protected] Nihil curo de ista tua stulta superstitione.