QRegularExpression: fixup docs of wildcardToRegularExpression
Fix a couple of typos, and add a paragraph explaining that there is no need of anchor the pattern again; a wildcard is always anchored. Fixes: QTBUG-81396 Change-Id: Ia67dc7477a05a450bdcc3def1ebbacce2006da4d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
7a59d6f138
commit
9f1948f59b
@ -1892,6 +1892,10 @@ QString QRegularExpression::escape(const QString &str)
|
|||||||
|
|
||||||
\snippet code/src_corelib_tools_qregularexpression.cpp 31
|
\snippet code/src_corelib_tools_qregularexpression.cpp 31
|
||||||
|
|
||||||
|
The returned regular expression is already fully anchored. In other
|
||||||
|
words, there is no need of calling anchoredPattern() again on the
|
||||||
|
result.
|
||||||
|
|
||||||
\warning Unlike QRegExp, this implementation follows closely the definition
|
\warning Unlike QRegExp, this implementation follows closely the definition
|
||||||
of wildcard for glob patterns:
|
of wildcard for glob patterns:
|
||||||
\table
|
\table
|
||||||
@ -1918,12 +1922,12 @@ QString QRegularExpression::escape(const QString &str)
|
|||||||
|
|
||||||
\note The backslash (\\) character is \e not an escape char in this context.
|
\note The backslash (\\) character is \e not an escape char in this context.
|
||||||
In order to match one of the special characters, place it in square brackets
|
In order to match one of the special characters, place it in square brackets
|
||||||
(for example, "[?]").
|
(for example, \c{[?]}).
|
||||||
|
|
||||||
More information about the implementation can be found in:
|
More information about the implementation can be found in:
|
||||||
\list
|
\list
|
||||||
\li \l {https://en.wikipedia.org/wiki/Glob_(programming)} {The Wikipedia Glob article}
|
\li \l {https://en.wikipedia.org/wiki/Glob_(programming)} {The Wikipedia Glob article}
|
||||||
\li \c man 7 glob
|
\li \c {man 7 glob}
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\sa escape()
|
\sa escape()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user