cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm US Eastern Time.

Discussions

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

How to use JSL to replace characters with special symbols in ""?

[{"ReqId":"200904","PoolId":"2001"}]

How to

[{\!"ReqId\!":\!"200904\!",\!"PoolId\!":\!"2001\!"}]

Thanks!

6 REPLIES 6
lala
Level IX

回复: How to use JSL to replace characters with special symbols in ""?

txt=Get Clipboard();
tx=Substitute(txt,"\!"","/\!\!"");//??

2023-10-17_18-47-56.png

jthi
Super User

Re: How to use JSL to replace characters with special symbols in ""?

I'm not sure what you want to replace and with what (which is start and which is end?). When you are printing strings which contain quotes, usually using Write() is a good idea so you don't see the JMP's escaped quotes

Names Default To Here(1);

str = "\[test: "text"]\";

Show(str); // str = "test: \!"text\!"";
Write("\!N");
Write(str); // test: "text"
-Jarmo
lala
Level IX

Re: How to use JSL to replace characters with special symbols in ""?

Thanks!

I see

copy this

[{\!"ReqId\!":\!"200904\!",\!"PoolId\!":\!"2001\!"}]

can see

2023-10-18_7-16-47.png

 

lala
Level IX

Re: How to use JSL to replace characters with special symbols in ""?

txt=Get Clipboard();
tx=Substitute(txt,"\!"","\!\!\!"");
lala
Level IX

Re: How to use JSL to replace characters with special symbols in ""?

  • Where can I see this syntax?

  • Thanks!
jthi
Super User

Re: How to use JSL to replace characters with special symbols in ""?

Try something like

Names Default To Here(1);

// [{\!"ReqId\!":\!"200904\!",\!"PoolId\!":\!"2001\!"}]

txt = Get Clipboard();
// Write(txt);

tx = Substitute(txt,"\!"","\!\!\!"");
// write(tx);

txt2 = "\!"ReqId\!"";
// Write(txt2);

tx2 = Substitute(txt, "\!\!", "");
// Write(tx2);

tx3 = Substitute(Get Clipboard(), "\!\!", "");
// Write(tx3);

Reading about JMP's escape sequences can also be helpful Scripting Guide > JSL Building Blocks > JSL Syntax Rules 

-Jarmo

Recommended Articles