cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
ckronig
Level III

remove carriage return

I am using JMPPro 18. I am trying to develop some scripts to clean up my data, and I have an issue with the carriage returns. I have read other other posts on this subject, and it is still not working for me.

when I use Recode to remove these, it works fine. However, when I save the recode workflow, and run the workflow, the data is not recoded.

 

I have tried using \r and \!r as suggested in other posts (but I notice that these don't appear in the recode script), but no luck

 

Any ideas where this is going wrong and what I could try would be most useful! Thanks in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: remove carriage return

Try using \!N then \!r , \!n and finally some weird combination of these. If none of these work, you might have to use regex / substitute. You can find JMP's escape sequences from here Scripting Guide > JSL Building Blocks > JSL Syntax Rules 

jthi_0-1734712777402.png

 

-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: remove carriage return

Try using \!N then \!r , \!n and finally some weird combination of these. If none of these work, you might have to use regex / substitute. You can find JMP's escape sequences from here Scripting Guide > JSL Building Blocks > JSL Syntax Rules 

jthi_0-1734712777402.png

 

-Jarmo
pmroz
Super User

Re: remove carriage return

You can also use something like this:

crlf = hex to char("0D0A");
print("CRLF Hello" || crlf || "World");
 
cr = hex to char("0D");
print("CR Hello" || cr || "World");
 
lf = hex to char("0A");
print("LF Hello" || lf || "World");

These snippets produce similar output.  

"CRLF Hello
World"
"CR Hello
World"
"LF Hello
World"
ckronig
Level III

Re: remove carriage return

Thanks for your response, I used \!n and my script now works! Much appreciated.

Recommended Articles