string changes

This commit is contained in:
Kovid Goyal 2022-05-15 20:59:40 +05:30
parent e9a82336c1
commit ae0f3a86db
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 2 deletions

View File

@ -83,7 +83,8 @@ shorthand:
The upper and lower case sets may match both upper and lowercase if the The upper and lower case sets may match both upper and lowercase if the
setting to make searches case insensitive is enabled. Such settings are setting to make searches case insensitive is enabled. Such settings are
found, for instance in Preferences->Searching in calibre itself and on the found, for instance in Preferences->Searching in calibre itself and on the
Search panel in the calibre viewer and editor programs. Search panel in the calibre :guilabel:`Viewer` as well as the calibre :guilabel:`Edit
book` tool.
As a last note on sets, you can also define a set as any character *but* those in the set. You do that by including the character ``"^"`` as the *very first character in the set*. Thus, ``[^a]`` would match any character excluding "a". That's called complementing the set. Those escape sequence shorthands we saw earlier can also be complemented: ``"\D"`` means any non-number character, thus being equivalent to ``[^0-9]``. The other shorthands can be complemented by, you guessed it, using the respective uppercase letter instead of the lowercase one. So, going back to the example ``<p[^>]*>`` from the previous section, now you can see that the character set it's using tries to match any character except for a closing angle bracket. As a last note on sets, you can also define a set as any character *but* those in the set. You do that by including the character ``"^"`` as the *very first character in the set*. Thus, ``[^a]`` would match any character excluding "a". That's called complementing the set. Those escape sequence shorthands we saw earlier can also be complemented: ``"\D"`` means any non-number character, thus being equivalent to ``[^0-9]``. The other shorthands can be complemented by, you guessed it, using the respective uppercase letter instead of the lowercase one. So, going back to the example ``<p[^>]*>`` from the previous section, now you can see that the character set it's using tries to match any character except for a closing angle bracket.

View File

@ -1201,7 +1201,7 @@ class SavedSearches(QWidget):
cs = '' if search.get('case_sensitive', SearchWidget.DEFAULT_STATE['case_sensitive']) else '' cs = '' if search.get('case_sensitive', SearchWidget.DEFAULT_STATE['case_sensitive']) else ''
da = '' if search.get('dot_all', SearchWidget.DEFAULT_STATE['dot_all']) else '' da = '' if search.get('dot_all', SearchWidget.DEFAULT_STATE['dot_all']) else ''
if search.get('mode', SearchWidget.DEFAULT_STATE['mode']) in ('regex', 'function'): if search.get('mode', SearchWidget.DEFAULT_STATE['mode']) in ('regex', 'function'):
ts = _('(Case sensitive: {0} Dot All: {1})').format(cs, da) ts = _('(Case sensitive: {0} Dot all: {1})').format(cs, da)
else: else:
ts = _('(Case sensitive: {0} [Normal search])').format(cs) ts = _('(Case sensitive: {0} [Normal search])').format(cs)
self.description.set_text(_('{2} {3}\nFind: {0}\nReplace: {1}').format( self.description.set_text(_('{2} {3}\nFind: {0}\nReplace: {1}').format(