| I'm testing on the Sender field for certain mailing lists and
| delivering to the matched word, for example:
| :0 : # Match on Sender field
| * SENDER ?? ()\/(plug-(devel|jobs)|pm-list)-admin@
| * MATCH ?? ()\/[^(_at_)]+
| where the expected Sender fields would be:
| My problem is I want to remove that "-admin" string from the MATCH
| variable, much like the '@' character is being removed.
| ... but I'd like to be able to test for the whole first half of the
| address, while omitting that "-admin" string in MATCH so the folder
| names remain manageable. How is this done?
There is no general answer, but try adding these two conditions:
* MATCH ?? ^^\/.*-
* MATCH ?? ^^\/.*[^-]
Those should strip the last hyphen-connected element from $MATCH.
procmail mailing list