Improve description of regular expressions in filter editor

This commit is contained in:
Stanislav Bolshakov 2021-06-04 08:52:24 +03:00 committed by Nick Hall
parent e4c17f52b4
commit 3b92c53822

View File

@ -606,16 +606,16 @@ class EditRule(ManagedWindow):
if class_obj.allow_regex: if class_obj.allow_regex:
use_regex = Gtk.CheckButton(label=_('Use regular expressions')) use_regex = Gtk.CheckButton(label=_('Use regular expressions'))
tip = _('Interpret the contents of string fields as regular ' tip = _('Interpret the contents of string fields as regular '
'expressions.\n' 'expressions:\n'
'A decimal point will match any character. ' '.\tA decimal point will match any character.\n'
'A question mark will match zero or one occurences ' '?\tA question mark will match zero or one occurences '
'of the previous character or group. ' 'of the previous character or group.\n'
'An asterisk will match zero or more occurences. ' '*\tAn asterisk will match zero or more occurences.\n'
'A plus sign will match one or more occurences. ' '+\tA plus sign will match one or more occurences.\n'
'Use parentheses to group expressions. ' '()\tUse parentheses to group expressions.\n'
'Specify alternatives using a vertical bar. ' '|\tSpecify alternatives using a vertical bar.\n'
'A caret will match the start of a line. ' '^\tA caret will match the start of a line.\n'
'A dollar sign will match the end of a line.') '$\tA dollar sign will match the end of a line.')
use_regex.set_tooltip_text(tip) use_regex.set_tooltip_text(tip)
grid.attach(use_regex, 1, pos, 1, 1) grid.attach(use_regex, 1, pos, 1, 1)