equal
deleted
inserted
replaced
124 for attr, regex in list(self._regex.items()): |
124 for attr, regex in list(self._regex.items()): |
125 if regex: |
125 if regex: |
126 values = [] |
126 values = [] |
127 for value in re.findall(regex, self.text, re.IGNORECASE): |
127 for value in re.findall(regex, self.text, re.IGNORECASE): |
128 value = value.strip() |
128 value = value.strip() |
129 if value and isinstance(value, basestring) and not value.isdigit(): |
129 if value and isinstance(value, basestring) and not value.isdigit() and '_date' in attr: |
130 # try casting to date format |
130 # try casting to date format |
131 value = cast_date( |
131 value = cast_date( |
132 value, |
132 value, |
133 dayfirst=self.dayfirst, |
133 dayfirst=self.dayfirst, |
134 yearfirst=self.yearfirst) |
134 yearfirst=self.yearfirst) |