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
SpannerHead
Level VI

Can ":" be a delimiter?

I need to delimit a string that contains a colon ":" as a delimiter.  I can replace all instances with something else.  Can I use it literally?


Slán



SpannerHead
5 REPLIES 5
jthi
Super User

Re: Can ":" be a delimiter?

Not sure what you are trying to do? It is just a character, you can use it how ever you want with strings?

-Jarmo
Thierry_S
Super User

Re: Can ":" be a delimiter?

Hi,

If you try to extract a substring from a string, you can define any delimiter you want (See example below) 

Word( 1, "AAA:BBB:CCC", ":" )

If you need to import a text file with ":" as a delimiter, I suggest uploading the raw text into one column and splitting it using the Column Utilities > Text to Columns (defining the column separator as ":").

If neither approach meets your needs, please share an example of what you are trying to achieve.

 

Best,

TS

Thierry R. Sornasse
SpannerHead
Level VI

Re: Can ":" be a delimiter?

I guess I had the source of the problem defined incorrectly.  If I include ":" as a delimiter together with "_" I seem to be getting red ink and a failed formula.

 

SpannerHead_0-1742495219675.png

 


Slán



SpannerHead

Re: Can ":" be a delimiter?

Hi,

 

If you need to specify multiple delimiters with the Word function, it's a single character string containing all the delimiters. For your example, you would specify ":_" as the third argument to Word.

 

Monica

jthi
Super User

Re: Can ":" be a delimiter?

Ah.. So you wish to have two strings to separate using Word? Add all the delimiters into the same string and it should work

Word(2, "A_B:C", "_:")

jthi_0-1742496186318.png

 

-Jarmo

Recommended Articles