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
dn610
Level III

Removing Part of a string of variable length

Hi - I'm trying to remove the IDs from the Name column (e.g. C17-2612.4 2612.4, C23, etc.). Can someone help me with the jsl?

 

dn610_0-1742831434753.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Removing Part of a string of variable length

Here is one approach

Names Default To Here( 1 );
For Each Row(
	name = Substr(
		name,
		Length( Word( 1, name, "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) ) + 2
	)
);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Removing Part of a string of variable length

Here is one approach

Names Default To Here( 1 );
For Each Row(
	name = Substr(
		name,
		Length( Word( 1, name, "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ) ) + 2
	)
);
Jim
jthi
Super User

Re: Removing Part of a string of variable length

Regex like this might work

Regex(:Name, "C.* ([A-Z].*)", "\1")
-Jarmo
dn610
Level III

Re: Removing Part of a string of variable length

Thank you both! Regex didn't work, but Jim's solution did work. 

Recommended Articles