This commit is contained in:
Kovid Goyal 2011-01-18 16:42:07 -07:00
parent 383b15e254
commit 10f4b48d68

View File

@ -46,8 +46,7 @@ class SearchAndReplaceWidget(Widget, Ui_Form):
for x in ('sr1_search', 'sr2_search', 'sr3_search'): for x in ('sr1_search', 'sr2_search', 'sr3_search'):
x = getattr(self, 'opt_'+x) x = getattr(self, 'opt_'+x)
try: try:
pat = unicode(x.regex).strip() pat = unicode(x.regex)
if pat:
re.compile(pat) re.compile(pat)
except Exception, err: except Exception, err:
error_dialog(self, _('Invalid regular expression'), error_dialog(self, _('Invalid regular expression'),