procmail
[Top] [All Lists]

Re: escaping special characters (in general)

1995-10-27 11:57:39
you asked:

I'm setting up a procmail filter that will give "Priority: A" to messages
of a particular subject which I have sent (via my own sendmail).  Basically,
I'm getting the value of "Subject:" and putting it as a filter in the form:

:0f
*^subject: (re:)? *the extracted subject
| formail -I "Priority: A"

Now, this works fine _as_long_as_the_extracted_subject_does_not_have_any
regular_expression_characters_in_it_.  Are there any scripts or programs
which will take a string with regular expression characters in it and
escape them all as output?

        If you are using procmail 3.11, $\foo will escape regex
metacharacters in foo

Soren