mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Add discussion about doubled backslashes for escaping chars in search query regular expressions
This commit is contained in:
parent
51e192f097
commit
5b17f850cd
@ -326,7 +326,8 @@ Two other kinds of searches are available: equality search and search using regu
|
|||||||
Equality searches are indicated by prefixing the search string with an equals sign (=). For example, the query
|
Equality searches are indicated by prefixing the search string with an equals sign (=). For example, the query
|
||||||
``tag:"=science"`` will match "science", but not "science fiction" or "hard science". Regular expression searches are
|
``tag:"=science"`` will match "science", but not "science fiction" or "hard science". Regular expression searches are
|
||||||
indicated by prefixing the search string with a tilde (~). Any python-compatible regular expression can
|
indicated by prefixing the search string with a tilde (~). Any python-compatible regular expression can
|
||||||
be used. Regular expression searches are contains searches unless the expression contains anchors.
|
be used. Note that backslashes use to escape special characters in reqular expressions must be doubled, because single backslashes will be removed during query parsing. For example, to match a literal parenthesis, you must enter ``\\(``. Regular expression searches are contains searches unless the expression contains anchors.
|
||||||
|
|
||||||
Should you need to search for a string with a leading equals or tilde, prefix the string with a backslash.
|
Should you need to search for a string with a leading equals or tilde, prefix the string with a backslash.
|
||||||
|
|
||||||
Enclose search strings with quotes (") if the string contains parenthesis or spaces. For example, to search
|
Enclose search strings with quotes (") if the string contains parenthesis or spaces. For example, to search
|
||||||
|
Loading…
x
Reference in New Issue
Block a user