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