Summary: | regex specs | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | netizen <rgawenda> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED NOT A BUG | ||
Severity: | normal | CC: | ninjalj |
Priority: | NOR | ||
Version: | 22.08.3 | ||
Target Milestone: | --- | ||
Platform: | Neon | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
netizen
2022-11-22 17:11:54 UTC
Can you provide more info? (In reply to Kurt Hindenburg from comment #1) > Can you provide more info? Of course, but it is an edge use case. I've a full screen konsole running a tail -f on a service log, when I'm publishing changes I usually put it into search to highlight some strings, now I'm searching for :app, app:, push: and 3000: (a quite simple regex), and what I'd love to achieve is to exclude the colon chat from the highlight using a "non capture group" in the regex. I know, I can and surely should, take my time to setup a custom grc config, as this FS Konsole has a dedicated monitor and is an important part of my job. That's not what non-capturing groups are for. What you need for your use-case are look-around assertions (http://pcre.org/current/doc/html/pcre2pattern.html#SEC20). E.g. to not include a trailing colon: foo(?=:) To not include a leading colon: (?<=:)foo or its alias: :\Kfoo (In reply to ninjalj from comment #3) > That's not what non-capturing groups are for. What you need for your > use-case are look-around assertions > (http://pcre.org/current/doc/html/pcre2pattern.html#SEC20). E.g. to not > include a trailing colon: > > foo(?=:) > > To not include a leading colon: > > (?<=:)foo > > or its alias: > > :\Kfoo You're right, and it works! I'm sorry. I'm closing this |