Hi,
i have a huge javascript file where I’d like to refactor some things. These are getter / setter which where objects fields so far and should be replaced with function calls.
I wrote a regex for this which uses conditional insertions in the replacement string.
I tried the following manual (TextMate) http://manual.macromates.com/en/regular_expressions [Section: 20.4.3 Conditional Insertions] which stated:
A simple test showed that either I’m doing a huge mistake and I just don’t get it or ther’s something not working as I would like it to (e.g. Sublime does not allow this):
[code] Find: (AA)(BB)
Replace: (?1:$2$2:CCCC)
Source: AABB
Output: (?1:BBBB:CCCC)
Expected: BBBB[/code]
As far as I read Sublime uses boost regex for that. Might it be that it boost-extended regex must be used for that but isn’t?
I have a tamplate using conditional insertions on the file name to create C++ namespaces which work pretty well but not as good as I want. That might be because of some error I found in there but weren’t able to fix, or it’s the same issue.
I’d like to ask you guys where the problem is. Is there someone out there whou could answer that / find my mistake or at least tell me if this does not work with sublime 3?
Thanks
Silberling
EDIT:
Oh, btw. Sublime 3 3064 on Linux x64