Summary: | Regex highlight pattern | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | Nick Cross <kde> |
Component: | general | Assignee: | Konversation Developers <konversation-devel> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | hein |
Priority: | NOR | ||
Version: | 1.5-rc1 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Nick Cross
2013-10-15 09:29:23 UTC
The regular expression syntax is documented here: http://qt-project.org/doc/qt-4.8/qregexp.html Everything except for the timestamp is matched. Should this regexp matching information be linked from the docs? I've tried <.*>.* or <\w+>.* and the matching / notification still doesn't work correctly. Docs: Probably, patches welcome. Regex: Let's take a step back. What's your overall goal? Regex: using the above sample [27/09/2013 15:03] <nc> ther: Yeah [27/09/2013 14:55] [Notify] fnr is online (irc.xxxx.com). [27/09/2013 14:22] <-- tk (~tk) has left this channel (Leaving). I want to match <any_nickname> any_random_text It seems any regex that contains '<' or '>' does not seem to match correctly. Let's take another step back: Why do you want to do this? :-) I want to monitor general messages on several company channels. But I don't want to see general channel join/leave etc messages in the notification. Konversation 1.5 has the ability to set a whitelist of windows as a constraint for a highlight, so you could simply go with .* + channel names there. Otherwise I'd recommend using Configure Notifications -> Command instead and writing a small script to be called from there (that can in turn use e.g. kdialog to spawn desktop notifications). I am using Konversation 1.5 and it does indeed work. The only problem is the regex matcher doesn't not seem to work. I don't understand what you need the regex matcher for, though? Referring to my three line example again. If I have a regex matcher of .* it notifies me for everything. What I really wanted was a regex so I could look for actual conversations not join/leave events. Therefore a regex of <.*>.* should notify me in a nice popup of [27/09/2013 15:03] <aperson> ther: Yeah but not of [27/09/2013 14:55] [Notify] fnr is online (irc.xxxx.com). [27/09/2013 14:22] <-- tk (~tk) has left this channel (Leaving). Right, ok. The nick isn't part of the match (sorry for the wrong info above). I recommend using Configure Notifications -> Command and running a script from there, or writing a regex that explicitly blacklists the phrases you don't want to match. Or you could disable the showing of join/nick/part events in Behavior -> Chat Window. Ah ok. Thanks for the info. I've disabled showing those events for now. |