cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

remove carriage return

ckronig
Level III

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.