cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

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

How to obtain all parts of a string except for the last segment?

How can I get all parts of a string except for the last segment? For example, given "This is a sentence," using -1 can get the last word "sentence." Using [1 3] can get "This is a," but since the string's length varies each time, the positions are not fixed. Is there a way to directly get all parts of the string except for the last segment?
Names Default To Here( 1 );
Word( -1, "This is a sentence" );
Word( [1 3], "This is a sentence" );
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to obtain all parts of a string except for the last segment?

Negative indexing

Word([1 -2], "This is a sentence");
-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: How to obtain all parts of a string except for the last segment?

Negative indexing

Word([1 -2], "This is a sentence");
-Jarmo

Recommended Articles