bernholdtde@ornl.gov wrote:
If I use a simple regex, like '^x-spam-flag: *yes' it seems to show up properly in the configuration. But if I use a more precise regex that accounts for all forms of whitespace with the "\s" sequence, like this '^\s*x-spam-flag:\s*yes\s*$' then what appears in the config file is '^\\s*x-spam-flag:\\s*yes\\s*$' in other words the backslashes have been quoted and are now literals.
Are you saying you see this with bin/dumpdb of the config.pck. If so, that's just the way python is showing the representation of the string. It is not the actual value of the string. If you doubt that, try 'strings' instead of 'bin/dumpdb'.
Also note the initial \s* in '^\s*x-spam-flag:\s*yes\s*$' really does nothing since if 'x-spam-flag:' is preceded by whitespace, it isn't a header. I.e., none of the headers presented to header_filter_rules regexps have leading whitespace.
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan