On Sun, Jan 25, 2026 at 21:30 (-0400), Jim wrote:
On Sun, Jan 25, 2026 at 16:29 (-0600), J Leslie Turriff via tde-users wrote:
On 2026-01-25 10:00:15 Jim via tde-users wrote:
On Sat, Jan 24, 2026 at 13:39 (-0600), J Leslie Turriff via tde-users wrote:
I'm trying to filter some semi-constant noise from the subject fields of mail items in a subfolder, but I can't get my filter to work. Clearly, I'm doing something fundamentally wrong, but I can't see what.
Here are some examples of Subject fields:
SUSE-SU-2026:0245-1: Security update for php7 openSUSE-SU-2026:10079-1: python311-weasyprint-68.0-1.1 on GA media
and here is the filter that doesn't work (quoted to show where there are spaces):
"(open)?SUSE-SU-[0-9]{4,4}: ?[0-9]{1,5}-[0-9]{1,2}: "
which kregexp interprets as:
Repeated at Most 1 Time: "open" "SUSE-SU-" Repeated Exactly 4 Times: One of the following Characters: from 0 to 9 ":" Repeated at Most 1 Time: " " Repeated From 1 to 5 Times: One of the following Characters: from 0 to 9 "- " Repeated From 1 to 2 Times: One of the following Characters: from 0 to 9 ": "
What am I overlooking/misunderstanding here?
Your regexp gets both of your sample lines with "grep -E" but not plain "grep" (as you probably know).
I don't use kmail, but do the filters allow extended regular expressions, just basic regexps, or something else yet?
Jim
Good question. Of course, the kregexpedit handbook doesn't say one way or another. When I have trouble getting a regexp filter to work I use the built-in editor, but this time it's not helping, though it looks like it should do what I want. See the attached snapshot.
Huh. I haven't seen that regexp editor (or anything like it) before. Very interesting.
I would interpret your PNG as saying that KMail does extended regexps, and yet it isn't working for you.
Is there any chance that these noisy subject lines have some non-printable characters, or characters that are not the characters you think they are?
For example, could the space in the subject lines actually be a non-breakable space?
(Another mailing list I'm on had a bit of a bunfight about a year ago when some 'Doze user mangled lines with multiple consecutive spaces into lines containing non-breakable spaces. He claimed his example worked (in plain TeX) but people copying and pasting from his email got non-breakable spaces, which caused the example to not work. And yet to the people in the bunfight, they all looked the same.)
Or could one of the hyphens be not the good old garden-variety ASCII hyphen, but some Unicode "Greek Orthodox Reformed Hyphen of 1873" (OK, I just made that up, but you might get what I am saying). I've seen lots of breakage when people type something up in some editor which automatically transmogrifies ASCII apostrophe into some obnoxious Unicode character. Not that you have either in your example, but...
(Again, not knowing KMail...) Is it easy to apply different filters on mail you have already received, or do they only work on new mail? If the latter, I would start with
"former". Duh.
(open)?SUSU-SU-[0-9]and see if that matches. If not, cut it down, if so, add more of your regexp. Fight the good fight.
Jim