On 2006-04-11, Michael McGarry <[EMAIL PROTECTED]> wrote: > Tim, > > for some reason that does not seem to do the trick. > > I am testing it with grep. (i.e., grep -e '(and|or|xor)\s*#' myfile)
Try with grep -P, which means use perl-compatible regexes as opposed to POSIX ones. I only know for sure that -P exists for GNU grep. I assumed it was a Python question! Unless you're testing your Python regex with grep, not realizing they're different. Perl and Python regexes are (mostly?) the same. I usually grep -P because I know Python regexes better than any other ones. -- http://mail.python.org/mailman/listinfo/python-list