[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 134101] New: \2 placeholder in regular expression
From:       Manoj Rajagopalan <rmanoj () engin ! umich ! edu>
Date:       2006-09-15 4:27:34
Message-ID: 20060915062732.134101.rmanoj () engin ! umich ! edu
[Download RAW message or body]

------- 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=134101         
           Summary: \2 placeholder in regular expression find-and-replace
                    fails
           Product: kdevelop
           Version: 3.3.2
          Platform: Fedora RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-bugs kdevelop org
        ReportedBy: rmanoj engin umich edu


Version:           3.3.2 (using KDE KDE 3.5.2)
Installed from:    Fedora RPMs
Compiler:          gcc 4.1.0 Fedora Core 5 / P4 1.7 GHz platform
OS:                Linux

When performing regular-expression find-and-replace, the \2 placeholder to indicate \
substitution by the second match is not substituted and simply appears as \2.

Example:

   I want to change variable names xmin_tex_plane, xmax_tmx_plane, ymax_tmy_plane, \
zmin_tmz_plane so that each begins with m_ (eg: m_xmin_tex_plane). To do this, I \
perform the following sequence of steps:

1. Ctrl-R to activate regular expression find-and-replace
2. declare the regular expression to be :  ([xyz])(min|max)(_t[em][eyz])
3. I enable the check-box labelled "Regular expression"
4. I declare the replace string to be : m_\1\2\3
5. I enable the "Use placeholders" check box

The result is that the above variables are modified to m_x\2_tex_plane, \
m_x\2_tmx_plane, m_y\2_tmy_plane, m_z\2_tmz_plane.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic