- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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!
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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!