Display the text if the regexp does not match
This commit is contained in:
parent
081d4f32f0
commit
207c5d9b41
1 changed files with 1 additions and 1 deletions
|
|
@ -209,7 +209,7 @@ class Regexp(Filter):
|
|||
if self.default is not _NO_DEFAULT:
|
||||
return self.default
|
||||
else:
|
||||
raise KeyError('Unable to match %s' % self.pattern)
|
||||
raise KeyError('Unable to match %s in %s' % (self.pattern, txt))
|
||||
|
||||
if self.template is None:
|
||||
return next(g for g in mobj.groups() if g is not None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue