diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2019-06-14 16:15:16 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2019-08-16 08:33:43 +0000 |
commit | 3b310a3ec13a743ae2258bc43d92a5df42c6ad37 (patch) | |
tree | 83583b810174313f0f093711e8fb70f40a37afc7 /doc | |
parent | 28f92d37842ef087ab4f35ae7018b6366d0044e9 (diff) |
Add regular expression support to replace operation
Introduce search with regular expressions support to replace
operation. Add unit tests and make associated documentation
changes.
Task-number: QTIFW-889
Change-Id: I82e30056030ebc900be49046fda1903b27a2824d
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/operations.qdoc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/operations.qdoc b/doc/operations.qdoc index 85a17a581..904421beb 100644 --- a/doc/operations.qdoc +++ b/doc/operations.qdoc @@ -90,8 +90,16 @@ is treated as ASCII text. \row \li Replace - \li "Replace" \c file \c search \ replace - \li Opens \c file to find \c search string and replaces that with the \c replace string. + \li "Replace" \c file \c search \c replace \c mode + \li Opens \c file to find \c search string and replaces that with the \c replace string, + using \c mode that can be either \c string or \c regex. For regular expressions + containing capturing groups, occurrences of \c \1, \c \2, ..., in \c replace are + replaced with the string captured by the corresponding capturing group. + + Note that testing the operation using \c devtool does not support commas inside the + \c search pattern as they are used as argument separators. When using \c regex mode you + should also ensure the \c search pattern adheres to \c QRegularExpression class + documentation, particularly to the escaping rules for characters. \row \li LineReplace \li "LineReplace" \c file \c search \c replace |