On Fri, 12 Apr 2002, Michael Fox wrote:
Hi *,
Not being a python guru myself, I was wondering if anyone could provide a code snippet that checks the value of a dtml-var to see if it's a valid email address..?
If you want to be really on top of it you could transliterate the example code from "Mastering Regular Expressions" which builds a regular expression for parsing rfc822 email addresses, be warned it's about 60 lines of characters. http://www.oreilly.com/regex is the website for the book, which is perl-oriented but python friendly and very useful if you want to explore the power of the re module. http://www.efn.org/~laprice ( Community, Cooperation, Consensus http://www.opn.org ( Openness to serendipity, make mistakes http://www.efn.org/~laprice/poems ( but learn from them.(carpe fructus ludi)