Why does Dreamweaver regex replace some word into a wrong word?
Why does Dreamweaver regex replace some word into a wrong word?
-----------------------
In short:
1. if you use a regex pattern contains an `or` syntax, `|`, eg:
(( and )|( that ))2. and your replacement contains a capture group `$1`, eg:
$1foobar3. and you perform an regex replace all in Dreamweaver
some text could be replaced with the wrong String, due to the `|` in the regex pattern. eg:
AA and BBit should be replaced into
AA and foobarBBbut it may be replaced into
AA that foobarBBwhich is wrong.
-----------------------
I had the exact same issue as what this web link describes (I reformated the simplified example from that link to above)
(For more detials, please view that link, it has better description and image.)
-----------------------
I am using Dreamweaver 2021 (Version 21.2)
OS Windows 10
-----------------------
(If someone test it, and you can / cannot reproduce the issue, please let me know.
And please let me know what version of Dreamweaver you are using that doesn't have such issue.)
