Subject: The mailing list for listmasters using Sympa
List archive
Re: [sympa-users] running a scenario regex match on subject that spans multiple physical lines?
- From: David Verdin <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-users] running a scenario regex match on subject that spans multiple physical lines?
- Date: Tue, 3 Nov 2020 09:35:41 +0100
Argh... Probably because modifiers are not allowed in the regexp definition. The second one would never have worked anyway.
Another proposal : trying to match a new line in the regexp:
match([header->Subject][0],/.*Re:.*\n*.*offlist.*\n*.*/) -> editorkey
Honestly, that looks weird even to me but it is still worth a
try.
Thank you, David. Unfortunately, my perl knowledge is no good, as both
match([header->Subject][0],/.*Re:.*offlist.*/ms) -> editorkey
match([header->Subject][0],/.*Re:.*offlist.*/ms/) -> editorkey
Hi Erik,
You might use the "/s" or "/m" modifier at the end of your regexp (as in "/.*Re:.*offlist.*/ms").
It allows multiple lines matching: https://docstore.mik.ua/orelly/perl/cookbook/ch06_07.htm
Cheers,
David
In the hobby mailing lists I admin, there are occasional messages posted that really need to be replied to off-list, and with the continuing trend of mailers to obscure what you're replying to, people just occasionally 'miss' and send an inappropriate reply to the list.
I added a line to our custom scenario file (thanks to this list for pointing me in that direction, btw) as such:
match([header->Subject][0],/.*Re:.*offlist.*/) -> editorkey
with the idea that anyone including the word "offlist" in the subject would be fine, but if someone tries to reply to the post, it gets moderated.
This worked great until someone tried a longer-ish subject
line, "Would you participate in a virtual gift exchange at
the December meeting? (reply offlist please)"
The replies did not get moderated. I think the culprit is that the subject is split into multiple lines - it looks that way in the source:
Subject: Re: [testing] [Airstone] Would you participate in a virtual gift exchange at the December meeting? (reply offlist please)
Is there a way to check against the entire concatenated
header?
Thanks as always for the insight of this list,
- Erik
--
-- "Mieux vaut viser la perfection et la rater que viser la médiocrité et l'atteindre." - Francis Blanche David Verdin Chef de Projet Collaboratif Département PROduits NUMériques Direction des Services Applicatifs RENATER - Rennes
Erik Olson address@concealed
-- "Mieux vaut viser la perfection et la rater que viser la médiocrité et l'atteindre." - Francis Blanche David Verdin Chef de Projet Collaboratif Département PROduits NUMériques Direction des Services Applicatifs RENATER - Rennes
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
-
Re: [sympa-users] running a scenario regex match on subject that spans multiple physical lines?,
David Verdin, 11/02/2020
-
Re: [sympa-users] running a scenario regex match on subject that spans multiple physical lines?,
Erik Olson, 11/02/2020
- Re: [sympa-users] running a scenario regex match on subject that spans multiple physical lines?, David Verdin, 11/03/2020
- <Possible follow-up(s)>
-
Re: [sympa-users] running a scenario regex match on subject that spans multiple physical lines?,
IKEDA Soji, 11/04/2020
- Re: [sympa-users] running a scenario regex match on subject that spans multiple physical lines?, Erik Olson, 11/04/2020
-
Re: [sympa-users] running a scenario regex match on subject that spans multiple physical lines?,
Erik Olson, 11/02/2020
Archive powered by MHonArc 2.6.19+.