By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!if ( *r == L'n' ) // insert newline
{
*p++ = L'\r';
*p++ = L'\n';
q++;
continue;
}
v:\> set z=1jjjj2jjjj3jjjj4
v:\> set zz=%@xreplace[jjjj,"\r\n\r\n",%z]
v:\> set z
1jjjj2jjjj3jjjj4
v:\> set zz
1r
r
2r
r
3r
r
4
p:\4utils\release> set z=1jjjj2jjjj3jjjj4
p:\4utils\release> set zz=%@xreplace[jjjj,"\r\n\r\n",%z]
p:\4utils\release> set z
1jjjj2jjjj3jjjj4
p:\4utils\release> set zz
1
2
3
4
@XREPLACE doesn't *require* back-references (\1, \2, ...). Apparently, neither does @REREPLACE.Vince,
I've done regex in Perl (albeit a while ago).
Does Rereplace *require* the use of back reference expressions? Can I do ordinary regex in it?
v:\> echo %@rereplace[a,e,bat]
bet
v:\> echo %@xreplace[a,e,bat]
bet
I don't know if there are any differences. There may be subtle ones. @XREPLACE predates @REREPLACE. I never bothered to remove it from 4UTILS when @REREPLACE arrived.Then what is the difference between Rereplace and Xreplace?
v:\> echo %@xreplace[3$i,o,iiiiii]
oooiii
v:\> echo %@xreplace[i,o,@windir]
C:\Wondows