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. ET 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
cchueng
Level III

Extract words from String Column

How do I create an Output1 column to extract all the words starting with "_D" from a column called String1? 

 

String1                                      Output1

PRD_D30405_v1                     D30405

PRD_MH1_D4375                   D4375

FET-D3245_v2_D43453          D43453

BDT_33tr-ge_DT3746_v2       DT3746

2 REPLIES 2
txnelson
Super User

Re: Extract words from String Column

Here is the formula that I used to get your result

txnelson_0-1746239724355.png

 

Word( 1, Substr( :String1, Contains( :String1, "_D" ) + 1 ), "_" )
Jim
jthi
Super User

Re: Extract words from String Column

You can also use Regex. This should work with your examples

Regex(:String1, "_(D[A-Z0-9]+)", "\1");

 

 

-Jarmo

Recommended Articles