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?
Leslie
Anno domini 2026 Sat, 24 Jan 13:39:59 -0600 J Leslie Turriff via tde-users scripsit:
I'm trying to filter some semi-constant noise from the subject fields of mailitems 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?Leslie
you might have to add a ".*" ath end of your regex
Nik
On 2026-01-24 14:00:29 Dr. Nikolaus Klepp via tde-users wrote:
Anno domini 2026 Sat, 24 Jan 13:39:59 -0600
J Leslie Turriff via tde-users scripsit:
I'm trying to filter some semi-constant noise from the subjectfields 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?Leslie
you might have to add a ".*" ath end of your regex
Nik
Ah, but that would include that text in the match, and I want the filter to leave that part alone.
Leslie
Anno domini 2026 Sun, 25 Jan 14:44:47 -0600 J Leslie Turriff via tde-users scripsit:
On 2026-01-24 14:00:29 Dr. Nikolaus Klepp via tde-users wrote:
Anno domini 2026 Sat, 24 Jan 13:39:59 -0600
J Leslie Turriff via tde-users scripsit:
I'm trying to filter some semi-constant noise from the subjectfields 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?Leslie
you might have to add a ".*" ath end of your regex
Nik
Ah, but that would include that text in the match, and I want the filter to leave that part alone.
hm ... I'm not sure if I understand what you want to achieve. "Filter" just applies a pattern. If it matchesm it applies the selected operation to the mail. It does not change the mail.
If you want to change the mails content, then you have to pipe it through a program (as a filter action) that does stuff with the mail. I have attached my "sanitizer" as an example on how to do that.
Nik
Leslie ____________________________________________________ tde-users mailing list -- users@trinitydesktop.org To unsubscribe send an email to users-leave@trinitydesktop.org Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/users@trinitydeskto...
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
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.
Leslie
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 (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
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
On 2026-01-25 16:29:17 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?
JimGood 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.
Strangely, overnight this regex has somehow healed itself and is now working as expected.
Leslie
On Wed, Jan 28, 2026 at 13:09 (-0600), J Leslie Turriff via tde-users wrote:
On 2026-01-25 16:29:17 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.
Strangely, overnight this regex has somehow healed itself and is now working as expected.
Sometimes all you need is a good sleep. Maybe regexps do too. ;-)
In any case, glad to hear it is working for you.
Jim