cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-259761%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E5%B8%B8%E8%A6%8F%E6%9B%BF%E6%8F%9B%E6%96%B9%E6%B3%95%E7%94%A8%E6%8F%9B%E8%A1%8C%E7%AC%A6%E8%99%9F%E6%88%96%E8%A3%BD%E8%A1%A8%E7%AC%A6%E5%8F%96%E4%BB%A3%E6%8C%87%E5%AE%9A%E7%9A%84%E6%96%87%E5%AD%97%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-259761%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3Ea%20%3D%E2%80%9CABCDEFG%26lt%3B-%26gt%3BHIJKLMNOP%26lt%3B-%26gt%3BQRSTUVWXYZ%E2%80%9D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%E4%B8%8D%E4%BD%BF%E7%94%A8%E5%B8%B8%E8%A6%8F%E6%96%B9%E6%B3%95%E3%80%82%3CBR%20%2F%3E%E5%B0%87%20%20%E6%9B%BF%E6%8F%9B%E7%82%BA%20TAB%E3%80%82%3CBR%20%2F%3E%E5%B0%87%20%26lt%3B-%26gt%3B%20%E6%9B%BF%E6%8F%9B%E7%82%BA%E6%8F%9B%E8%A1%8C%E7%AC%A6%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E9%80%99%E6%9C%83%E5%B0%87%20a%20%E7%9A%84%E5%85%A7%E5%AE%B9%E5%AF%AB%E5%85%A5%E8%A1%A8%E4%B8%AD%E3%80%82%E8%AC%9D%E8%AC%9D%EF%BC%81%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%222020-04-22_18-13.png%22%20style%3D%22width%3A%20160px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222020-04-22_18-13.png%22%20style%3D%22width%3A%20160px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%222020-04-22_18-13.png%22%20style%3D%22width%3A%20160px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F23306iD40CD0BE879DA884%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%222020-04-22_18-13.png%22%20alt%3D%222020-04-22_18-13.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-353627%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E5%B8%B8%E8%A6%8F%E6%9B%BF%E6%8F%9B%E6%96%B9%E6%B3%95%E4%BB%A5%E6%8F%9B%E8%A1%8C%E7%AC%A6%E8%99%9F%E6%88%96%E8%A3%BD%E8%A1%A8%E7%AC%A6%E5%8F%96%E4%BB%A3%E6%8C%87%E5%AE%9A%E7%9A%84%E6%96%87%E5%AD%97%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-353627%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4550%22%20target%3D%22_blank%22%3E%40pmroz%3C%2FA%3E%E8%AC%9D%E8%AC%9D...%E6%82%A8%E7%9F%A5%E9%81%93%E9%80%8F%E9%81%8E%20mail()%20%E5%87%BD%E6%95%B8%E7%99%BC%E9%80%81%E9%9B%BB%E5%AD%90%E9%83%B5%E4%BB%B6%E6%99%82%E5%A6%82%E4%BD%95%E5%9F%B7%E8%A1%8C%E6%AD%A4%E6%93%8D%E4%BD%9C%E5%97%8E%EF%BC%9F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E4%B9%BE%E6%9D%AF!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-259771%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E5%B8%B8%E8%A6%8F%E6%9B%BF%E6%8F%9B%E6%96%B9%E6%B3%95%E4%BB%A5%E6%8F%9B%E8%A1%8C%E7%AC%A6%E8%99%9F%E6%88%96%E8%A3%BD%E8%A1%A8%E7%AC%A6%E5%8F%96%E4%BB%A3%E6%8C%87%E5%AE%9A%E7%9A%84%E6%96%87%E5%AD%97%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-259771%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E5%9C%A8%20JMP%20%E4%B8%AD%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E6%8C%87%E5%AE%9A%E6%8F%9B%E8%A1%8C%E7%AC%A6%E5%92%8C%E8%A3%BD%E8%A1%A8%E7%AC%A6%EF%BC%8C%E5%A6%82%E4%B8%8B%E6%89%80%E7%A4%BA%EF%BC%9A%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enewline%20%3D%20%22%5C!n%22%3B%0Atab%20%3D%20%22%5C!t%22%3B%0Aa%20%3D%20evalinsert(%22Hello%20World%5Etab%5EAgain%5Enewline%5EFubar%5Etab%5EAgain%22)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E4%BD%BF%E7%94%A8%E6%9B%BF%E6%8F%9B%E5%91%BD%E4%BB%A4%E5%B0%87%E5%AD%97%E4%B8%B2%E6%9B%BF%E6%8F%9B%E7%82%BA%E6%8F%9B%E8%A1%8C%E7%AC%A6%E6%88%96%E8%A3%BD%E8%A1%A8%E7%AC%A6%E3%80%82%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3Enewline%20%3D%20%22%5C!n%22%3B%0Atab%20%3D%20%22%5C!t%22%3B%0A%0Aa%20%3D%20%22ABCDEFG%26lt%3B-%26gt%3BHIJKLMNOP%26lt%3B-%26gt%3BQRSTUVWXYZ%22%3B%0Ab%20%3D%20substitute(a%2C%20%22%22%2C%20tab)%3B%0Ac%20%3D%20substitute(b%2C%20%22%26lt%3B-%26gt%3B%22%2C%20newline)%3B%0A%0Awrite(c)%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%E8%BC%B8%E5%87%BA%EF%BC%9A%3C%2FP%3E%0A%3CPRE%3EAB%20CDEFG%0AHIJK%20LMNOP%0AQRSTU%20VWXYZ%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
lala
Level IX

How can replace a specified literal with a newline or TAB with a regular substitution method?

a="AB</>CDEFG<->HIJK</>LMNOP<->QRSTU</>VWXYZ"

 


Regular methods are not used.
Replace </> with a TAB.
Replace <-> with a newline character.

 

 

This writes the contents of a to the table.Thanks!

 

2020-04-22_18-13.png

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: How can replace a specified literal with a newline or TAB with a regular substitution method?

In JMP you can specify a newline and tab like this:

newline = "\!n";
tab = "\!t";
a = evalinsert("Hello World^tab^Again^newline^Fubar^tab^Again");

Use the substitute command to replace your character strings with newline or tab.

newline = "\!n";
tab = "\!t";

a = "AB</>CDEFG<->HIJK</>LMNOP<->QRSTU</>VWXYZ";
b = substitute(a, "</>", tab);
c = substitute(b, "<->", newline);

write(c);

Output:

AB	CDEFG
HIJK	LMNOP
QRSTU	VWXYZ

View solution in original post

2 REPLIES 2
pmroz
Super User

Re: How can replace a specified literal with a newline or TAB with a regular substitution method?

In JMP you can specify a newline and tab like this:

newline = "\!n";
tab = "\!t";
a = evalinsert("Hello World^tab^Again^newline^Fubar^tab^Again");

Use the substitute command to replace your character strings with newline or tab.

newline = "\!n";
tab = "\!t";

a = "AB</>CDEFG<->HIJK</>LMNOP<->QRSTU</>VWXYZ";
b = substitute(a, "</>", tab);
c = substitute(b, "<->", newline);

write(c);

Output:

AB	CDEFG
HIJK	LMNOP
QRSTU	VWXYZ
Stefan
Level III

Re: How can replace a specified literal with a newline or TAB with a regular substitution method?

@pmroz thank you...do you have any idea on how to do this when sending an email via the mail() function?

 

Cheers!

Recommended Articles