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
Sean_ShCn0
Level II

How to use Regular expression to get characters?

A simple question, please find the attachment as a demo. 

the requirement as following, it is required to take some information from :Label column, to two new column, details find the pic "image.png".

thanks in advance.

KR

Sean

1 REPLY 1
jthi
Super User

Re: How to use Regular expression to get characters?

Just based on your example you don't need regex as Word() might be enough

 

For F

 

Word(-2, str, ",F+S"); // "18441"

for S

 

 

Word(-1, str, ",F+S"); // "18442"

 

Example

Names Default To Here(1);

str = "-F19,S20+F18441,S18442";

Show(Word(-2, str, ",F+S"));
Show(Word(-1, str, ",F+S"));

 

-Jarmo

Recommended Articles