Regex support for watch module #266

Open
opened 2026-10-05 04:08:45 +02:00 by adam · 10 comments
Owner

Feature request
Some form of regular expression support in the watch module would be useful, and is a feature some other bouncers support. I'm not sure what the best way would be to support it while also supporting the old format, or how to add the current nick into the pattern.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/987629-regex-support-for-watch-module?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github).
Feature request Some form of regular expression support in the watch module would be useful, and is a feature some other bouncers support. I'm not sure what the best way would be to support it while also supporting the old format, or how to add the current nick into the pattern. ## <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/987629-regex-support-for-watch-module?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1759&utm_medium=issues&utm_source=github). </bountysource-plugin> <!-- github-sync-id:20474794 -->
Author
Owner

Regex would either require a dependency or a dependency on c++11 to use the new regex library.

Regex would either require a dependency or a dependency on c++11 to use the new regex library. <!-- github-comment-id:25654109 -->
Author
Owner

It would be really useful, though.

It would be really useful, though. <!-- github-comment-id:89877540 -->
Author
Owner

This is now achievable that we use C++11. A pull request would be appreciated 👌.

This is now achievable that we use C++11. A pull request would be appreciated :ok_hand:. <!-- github-comment-id:89894181 -->
Author
Owner

Ooh, nice. I'll see if I can take a look.

Ooh, nice. I'll see if I can take a look. <!-- github-comment-id:89900217 -->
Author
Owner

Notice that the regex support is very limited in any GCC version earlier than 4.9.

Notice that the regex support is very limited in any GCC version earlier than 4.9. <!-- github-comment-id:89984073 -->
Author
Owner

Well that's frustrating. My ZNC server is on EL7 which uses GCC 4.8.3.

Well that's frustrating. My ZNC server is on EL7 which uses GCC 4.8.3. <!-- github-comment-id:90252184 -->
Author
Owner

4.8.2 is the default on Ubuntu 14.04, 4.9.x is default on Ubuntu 14.10 and later (15.04). However, this is going to pose problems for older versions. Not sure if a similar issue will be seen in Debian as well.

4.8.2 is the default on Ubuntu 14.04, 4.9.x is default on Ubuntu 14.10 and later (15.04). However, this is going to pose problems for older versions. Not sure if a similar issue will be seen in Debian as well. <!-- github-comment-id:90286909 -->
Author
Owner

Maybe it would make sense to use PCRE, then? That's fairly likely to be on most systems due to its wide use in other projects (e.g. Apache).

Maybe it would make sense to use PCRE, then? That's fairly likely to be on most systems due to its wide use in other projects (e.g. Apache). <!-- github-comment-id:90356379 -->
Author
Owner

Alternatively, libc includes regex support, though I don't know how well that works. Also, last time I checked (admittedly a while ago), libc's regex support was dog slow. Maybe that's changed?

Edit: Took another look and it looks like the libc regex stuff is fast now, so maybe that's the way to go.

Alternatively, libc includes regex support, though I don't know how well that works. Also, last time I checked (admittedly a while ago), libc's regex support was dog slow. Maybe that's changed? **Edit**: Took another look and it looks like the libc regex stuff is fast now, so maybe that's the way to go. <!-- github-comment-id:90741086 -->
Author
Owner

just found someone on irc who wanted this so I've put up again the fork of watch I did some time ago (this time on git instead of hg which nobody ever accessed :D), though will need merge of the translateable strings (should work on 1.6.5 without those anyway), if I do that, how likely is this to get accepted somewhere more public than personal repo? https://gitlab.ourcloud.cz/ghormoon/znc-additions/tree/master (but yeah, it uses boost which you might dislike. but at least who needs it, can use it from here :))

just found someone on irc who wanted this so I've put up again the fork of watch I did some time ago (this time on git instead of hg which nobody ever accessed :D), though will need merge of the translateable strings (should work on 1.6.5 without those anyway), if I do that, how likely is this to get accepted somewhere more public than personal repo? https://gitlab.ourcloud.cz/ghormoon/znc-additions/tree/master (but yeah, it uses boost which you might dislike. but at least who needs it, can use it from here :)) <!-- github-comment-id:342435816 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#266