• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.


The @REREPLACE page is missing from the help (or at least from the index). Clicking @REREPLACE in "What's new" takes you to the @SERIALPORTCLOSE page.

I don't know whether @REREPLACE is supposed to act exactly like @XREPLACE, but I can't do this one with @REREPLACE:

v:\> echo %@xreplace["My dog has (.*)",\1,My dog has fleas.]
v:\> echo %@rereplace["My dog has (.*)",\1,My dog has fleas.]
TCC: (Sys) The parameter is incorrect.
"%@rereplace["My dog has (.*)",\1,My dog has fleas.]"
OK, if I leave out the quotes, it works:
v:\> echo %@rereplace[My dog has (.*),\1,My dog has fleas.]
And commas in either re must be escaped ... right ... that's OK.
v:\> echo %@xreplace["(?i)[a-z]*, (.*)",\1,Fatica, Vincent]
v:\> echo %@rereplace[(?i)[a-z]*^, (.*),\1,Fatica, Vincent]
It would be surprising if it did, since I've never seen or used @XREPLACE.

I added support for (unnecessary) surrounding quotes in 14.0.16.
I wasn't asking for that ... only figuring out how it worked. @XREPLACE uses quotes to protect commas in the RE and the replacement string. I like @REREPLACE's approach better ... let the user escape such quotes ... because in nearly all such instances, he can do so because he's composing those two parameters.
Top Bottom