<<< Date Index >>>     <<< Thread Index >>>

Re: Conditionally removing signature



On 09Jul2009 16:37, Jan-Herbert Damm <jan-h-damm@xxxxxx> wrote:
| If you find this too OT, please accept my apolgies and ignore it. I will try 
to
| ask somewhere "pythonic". 

Looks on topic to me.

| Rocco Rutte wrote on 09.07.09:
[...]
| >     mail_re = re.compile(r'^[^<]+<([^>]+)>.*')
[...]
| I havn't gotten it to work yet. Could the regex be the culprit?
| A test with 
| 
| bash$ gpg --with-colons --list-keys | grep '^[^<]+<([^>]+)>.*' 
| 
| doesn't find any lines.

Use egrep. The python regexp is an "extended" regular expression (hence
the "e" in egrep). Regular grep uses "basic" regular expressions, which
do not have "+" amongst other things.

| And the script prints the resulting strings to stdout and not to the "config
| file" as Rocco wrote - right?

Rocco sources the output of the script.

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Reality is that which refuses to go away when I stop believing in it.
- Phillip K. Dick