Patrick’s Rants


Netflix, Inc.Netflix

8/7/2005

So that’s how you write a python regex

Filed under: Geek News and Stuff — site admin @ 2:31 pm

After more time than it should have ever taken, I ran across this website: http://www.python.org/doc/current/lib/module-re.html. Long story short though I wanted to discard addresses in Mailman. So the regex that works to discard senders in the privacy settings in Mailman is:
^[.]+@example.com So simple, so duh once I got it. This translates to (Mailman wants the caret[^] to denote a following regex) ^ Mailman’s starting character. [.] is any character, the + following it means one or more. So one or more of any character then your @ and the domain you want to get rid of. There are more delicate and fine tuned methods, but this works for me.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.



Powered by WordPress

Comments, opinions and drivel © the poster. Satire protected under Fair Use. Opinion protected under First Amendment (see: Constitution of the United States)

Bad Behavior has blocked 137 access attempts in the last 7 days.