--- In [email protected], Julien Pierrehumbert <[EMAIL PROTECTED]> 
wrote:
>
> Sheri wrote:
> > Is this something you can easily fix?
> > 
> >  http://tech.groups.yahoo.com/group/power-pro/message/30299
> 
> 
> I'm not sure I can do anything about the case you
> provided... I don't get the result you say you're
> getting. Could you try it again (with the CRLF or the
> "any" build!)

As before, this is what I get with the previous build and "any"

Hello\rHello\nGoodbye\rHelloHello\nHello\rHello\n

This is what I get with the new build

Hello\r\nGoodbye\rHelloHello\nHello\r\n

expected result is

Hello\r\nGoodbye\r\nHello\r\n

I was previously using file.writeall to write the string to a file
which I then inspected with a hex editor to see the carriage returns
and line feeds, but this is easier:

local mystring="\r\nGoodbye\r\n\r\n"
local mypattern=?"(?m)^$"
local myreplace=?"Hello"
local myvar
regex.replaceg(mystring, mypattern, myreplace, "myvar")
regex.replaceg(myvar, "\r", ?"\r", "mystring")
regex.replaceg(mystring, "\n", ?"\n", "myvar")
win.debug(myvar)

I will locate a "crlf" dll and see if using it makes any difference.

Regards,
Sheri

Reply via email to