Re: Search mails using regular expressions

Adriaan de Groot <[email protected]> Thu, 04 May 2023 22:55:17 +0200
Newsgroups gmane.comp.kde.devel.pim
Organization KDE.org
Message-ID <[email protected]>
On Thursday, 4 May 2023 17:23:24 CEST Colin Close wrote:
> Are regular expressions currently available in Kmail? The ui interface both
> in filters and in the search dialog indicate that they are. 

In KMail I clicked Tools -> Find Messages (S) and the Find Messages dialog has 
filter criteria. I could pick e.g. "Subject matches regular expr." as a match 
criterium. So it looks like they are.

That said, entering "fina[ln]" does not seem to match that as a regular 
expression at all, although it did find messages with "[LN]" in the subject. 
After trying a couple of other searches, KMail crashed on me.

> I have done my
> best to determine this from the code by grepping for calls to QRegExp but
> this proved fruitless. 

There's also QRegularExpression, so you may need to grep harder. And don't 
forget that KMail uses multiple KDE-PIM libraries, so you may need to search 
beyond the KMail repository only. 

> Can you advise whether the functionality is
> available and just broken or in fact that it is not supported. 

To me -- based on the one experiment described above, I've never used regexp 
searching in subject before  -- it looks broken.

[ade] (just a user of KMail)
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEAKzRXiWnn+4Ciw7lf+o9phacd9YFAmRUG7UACgkQf+o9phac
d9aeHg//c04ClP9BVZxBjwc5evlqG8W97b0ycQpzirtOprdBt09btz9QMUQEOEzz
4EQoMSg1Hugb/RdzNCR5qlCtN2YpV6fQVN/thPiimIByYFK/3WkWFK9UyQwOs3MR
hpvRiTtzZtpI5ckKnz4DQxAJ2v3sGKL+vvTYceokaX+WkT/6eUkOowFjlN+J0bEV
J2f5jIu8vpWgTAfKs6q86hwXxFy49pA1RJ9gKdJHWrEoxAIGQ27hLHoVDdecoOce
PqGnu4lCnnehaMOSGoG/i8kwSMlLSWDhFpBMSeHmzdtzBs4eL96zJKtTRji97hRq
X5PfjOBwF35+K1AUcIiyXi9Atoww8CfhOi+B+rQh3gfWPcHo0DpAG9zQmAEgFD+o
qLkoEGY5HsroyPHHagIsOWHFC1+p67TvIXgFbqdQ8N5LmLVoZ8MJsVLw5LKSJq7B
LUZ2JBydryNxfmuAuYbcQ8dTEqpI3M9XfCalBjimsd1OU2BpO+/EAa/5N8rxPnuN
1pKVi9we8SB/a+eHs38EeTnO0EA0xQgEn4mkcXsQgfX+YE5yomV0ytfqhcIjKfvc
XltOwJXfxvl7+veb/LgGjNOmj1VnPd4G2Lu7jM96gyJZ1+5IpTyyq9NxP8AJaW3C
f4SLv/3p+IQusk3AcWYaknw1ZLDRY7ycJXe9c+BN1X1PO5j2fC0=
=Ob+t
-----END PGP SIGNATURE-----