#6603
Yutaka Emura
Keymaster

webern wrote:
I have the problem with the macro below:

with (document.selection){
Replace("^","* ", eeFindNext | eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
Replace("(?<!(.)$)$", ".", eeFindNext | eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp);
}

Something wrong with the above (highlighted) regexp. I know this regexp is not perfect, but I get exactly what I want with it on EE7.
The results are different on EE8.

Steps to reproduce:
1. Apply the macro to the text below:

[font=Verdana]EmEditor Text Editor is a lightweight
EmEditor Text Editor is a lightweight
EmEditor Text Editor is a lightweight.
EmEditor Text Editor is a lightweight.


(a) On EE7 the results are as follows (changes are highlighted):

* EmEditor Text Editor is a lightweight.
* EmEditor Text Editor is a lightweight.
* EmEditor Text Editor is a lightweight.
* EmEditor Text Editor is a lightweight.

(b) On EE8 I got something wrong (highlighted):

* EmEditor Text Editor is a lightweight.
* EmEditor Text Editor is a lightweight..
* EmEditor Text Editor is a lightweight.
.* EmEditor Text Editor is a lightweight.

2. Press Ctrl+Z right after applying the macro on EE8 then look at the screen to see what the Undo have produced.

P.S. A friend of mine suggested me to replace the imperfective “(?<!(.)$)$", ".” with more reliable “([^.])$”, “1.
but after applying it added an unwanted extra to the end of the selection.
[/font]

RC 5 addressed this issue. Please try again with RC 5. Thank you!