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.
Choose Language Hide Translation Bar
Alex19
Level II

How to cut the string after a SPECIFIC symbol?

I have a column of strings with the full File Path + File Name. I need to isolate specifically the File Name in the next column. Is there a way to do it?

Alex19_2-1681330445473.png

 

Note: I entered the File Name manually.

Thank you all in advance!

Alex.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to cut the string after a SPECIFIC symbol?

word(-1, :File Path, "\/" );

or

reverse(substr(reverse(:File Path),1,contains(reverse(:File Path), "\") -1 ) );
Jim

View solution in original post

3 REPLIES 3
Alex19
Level II

Re: How to cut the string after a SPECIFIC symbol?

A small clarification - as a pseudo-code I'd need something like that: cut string before the first "\" when scanning the string from the right-to-left. My problem is that I can have Path and File Name of variable lengths, so, cannot use "Left" or "Right" functions with the fixed # of characters to isolate...

Alex19_2-1681331298938.png

 

 

 

txnelson
Super User

Re: How to cut the string after a SPECIFIC symbol?

word(-1, :File Path, "\/" );

or

reverse(substr(reverse(:File Path),1,contains(reverse(:File Path), "\") -1 ) );
Jim
Alex19
Level II

Re: How to cut the string after a SPECIFIC symbol?

Oh this is beautiful! Thank you so much!

Recommended Articles