[Bug 168226] New: KReplace: Placeholder substitution for regular expressions not implemented
Christoph Burgmer
chrislb at gmx.de
Sun Aug 3 17:00:09 CEST 2008
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=168226
Summary: KReplace: Placeholder substitution for regular
expressions not implemented
Product: kdelibs
Version: unspecified
Platform: Debian testing
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: kdeui
AssignedTo: kdelibs-bugs kde org
ReportedBy: chrislb gmx de
Version: (using KDE 4.1.0)
Installed from: Debian testing/unstable Packages
KReplaceDialog [1] allows for replacing text matched by a regular expressions with substituting content from the match using placeholders (\0, \1...). This can be set by giving option BackReference = 512.
KFindDialog implements widgets for setting this option in [2].
KReplace only implements placeholder \0 though, which means only substituting the whole match.
Currently extracting a partial match from the given regular expression is not supported.
I consider this a bug as this functionality is clearly wanted by the UI but not given by the underlying library. This feature is used in the KTextEdit widget.
See the Kate implementation on replacing using placeholders [4]. Maybe this can be merged into KReplace.
[1] http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKReplaceDialog.html
[2] http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/kfinddialog_8cpp-source.html#l00116
[3] http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/kreplace_8cpp-source.html#l00250
[4] http://api.kde.org/4.x-api/kdelibs-apidocs/kate/html/katesearchbar_8cpp-source.html#l00338
More information about the Kdelibs-bugs
mailing list