It looks like the look-ahead sub-expr breaks something. If you don't use that, it works. E.g., if you match (bug)(here) and replace with $0 or with $1$2, it works.
Since you found it, you have the honor of submitting the YouTrack report, after checking to make sure it's not already reported, of course.
I added a note to the bug report mentioning that it occurs for me in 8.1.3, too. Then I noticed that here in the forum you said you were using 8.1.3, but in the bug report it is labeled "Affected versions: Maia EAP 10762"
It is. Are you sure you've got the Replace dialog in Regular Expression mode?
And, of course, while $0 is always available, $1 and greater only work when there's a capturing group that matched in the RE.
Randall Schulz
Ok...I'm now posting a TC here:
Env : IDEA 8.1.3, WinXP
It looks like the look-ahead sub-expr breaks something. If you don't use that, it works. E.g., if you match (bug)(here) and replace with $0 or with $1$2, it works.
Since you found it, you have the honor of submitting the YouTrack report, after checking to make sure it's not already reported, of course.
Randall Schulz
Bug reported here, thanks for the help.
HI,
I added a note to the bug report mentioning that it occurs for me in 8.1.3, too. Then I noticed that here in the forum you said you were using 8.1.3, but in the bug report it is labeled "Affected versions: Maia EAP 10762"
Randall Schulz