def setup_pats(self, s): (r0, r1, r2) = rsplit(s) self.r0 = [encodew(w) for w in r0] self.r1 = [encodew(w) for w in r1] self.r2 = [encodew(w) for w in r2] self.matchpat = re.compile( r'\W*'.join(c for (c, t) in splitchars(s) if t), re.I | re.UNICODE) self.checkpat = self.matchpat return
def setup_pats(self, s): (r0,r1,r2) = rsplit(s) self.r0 = [ encodew(w) for w in r0 ] self.r1 = [ encodew(w) for w in r1 ] self.r2 = [ encodew(w) for w in r2 ] self.matchpat = re.compile( r'\W*'.join( c for (c,t) in splitchars(s) if t ), re.I | re.UNICODE) self.checkpat = self.matchpat return
def setup_pats(self, s): (r0, r1, r2) = rsplit(s) self.r0 = [encodew(w) for w in r0] self.r1 = [encodew(w) for w in r1] self.r2 = [encodew(w) for w in r2] self.matchpat = re.compile( r'\W*'.join(c for (c, t) in splitchars(s) if t), re.I | re.UNICODE) if not self.ALL_ALPHABET.match(s): self.checkpat = re.compile( r'\s*'.join( re.escape(c) for (c, t) in splitchars(s) if not c.isspace()), re.UNICODE) else: self.checkpat = self.matchpat return
def setup_pats(self, s): (r0,r1,r2) = rsplit(s) self.r0 = [ encodew(w) for w in r0 ] self.r1 = [ encodew(w) for w in r1 ] self.r2 = [ encodew(w) for w in r2 ] self.matchpat = re.compile( r'\W*'.join( c for (c,t) in splitchars(s) if t ), re.I | re.UNICODE) if not self.ALL_ALPHABET.match(s): self.checkpat = re.compile( r'\s*'.join( re.escape(c) for (c,t) in splitchars(s) if not c.isspace() ), re.UNICODE) else: self.checkpat = self.matchpat return