On 2006-04-11, Michael McGarry <michael.mcgarry at gmail.com> wrote: > Hi, > > I would like to form a regular expression to find a few different > tokens (and, or, xor) followed by some variable number of whitespace > (i.e., tabs and spaces) followed by a hash mark (i.e., #). What would > be the regular expression for this? re.compile(r'(?:and|or|xor)\s*#')