Logo Search packages:      
Sourcecode: zope-formulator version File versions  Download package

def Formulator::PatternChecker::PatternChecker::construct_value_from_match (   self,
  result,
  pattern 
)

After we validated the string, we put it back together; this is
good, since we can easily clean up the data this way.

Definition at line 68 of file PatternChecker.py.

00068                                                          :
        """After we validated the string, we put it back together; this is
        good, since we can easily clean up the data this way.
        """
        pattern = self._escape_special_characters(pattern)
        _symbols = '['+NUMBERSYMBOL + CHARSYMBOL + NUMCHARSYMBOL + ']'
        re_obj = re.compile(_symbols+'{1,}\*?')
        values=[]
        for res in result.groups():
            match = re_obj.search(pattern)
            values.append(pattern[:match.start()])
            values.append(res)
            pattern = pattern[match.end():]
        values.append(pattern)
        return ''.join(values)

    def clean_value(self, value):


Generated by  Doxygen 1.6.0   Back to index