monkey2 icon indicating copy to clipboard operation
monkey2 copied to clipboard

Can't replace "~n" (two chars)

Open engor opened this issue 7 years ago • 2 comments

I have plain text file containing string hello ~n world! I want to replace ~n two chars with real \n char.

Local s:=LoadString("asset::test.txt" )
Print "1: "+s.Replace("~~n","~n")
Print "2: "+s.Replace("~n","~n")

It doesn't work, ~~ works unexpectedly here.

engor avatar Jul 29 '18 15:07 engor

Can you email me test.txt?

On Mon, Jul 30, 2018 at 3:22 AM Evgeniy Goroshkin [email protected] wrote:

I have plain text file containing string hello ~n world! I want to replace ~n two chars with real \n char.

Local s:=LoadString("asset::test.txt" ) Print "1: "+s.Replace("~~n","~n") Print "2: "+s.Replace("~n","~n")

It doesn't work, ~~ works unexpectedly here.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blitz-research/monkey2/issues/412, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3QkwGViBT1hXcpkZyIxvXXC6hZCmyks5uLdM8gaJpZM4VldTK .

blitz-research avatar Jul 29 '18 21:07 blitz-research

Nevermind, can reproduce now...

On Mon, Jul 30, 2018 at 9:15 AM Mark Sibly [email protected] wrote:

Can you email me test.txt?

On Mon, Jul 30, 2018 at 3:22 AM Evgeniy Goroshkin < [email protected]> wrote:

I have plain text file containing string hello ~n world! I want to replace ~n two chars with real \n char.

Local s:=LoadString("asset::test.txt" ) Print "1: "+s.Replace("~~n","~n") Print "2: "+s.Replace("~n","~n")

It doesn't work, ~~ works unexpectedly here.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blitz-research/monkey2/issues/412, or mute the thread https://github.com/notifications/unsubscribe-auth/ADU3QkwGViBT1hXcpkZyIxvXXC6hZCmyks5uLdM8gaJpZM4VldTK .

blitz-research avatar Jul 29 '18 22:07 blitz-research