cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

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

How to extract characters in occurrences of a certain character

for instance, I have a string of "JN-36M-GRNNC", I would like to extract "JN", "36M and "GRNNC" by using formula. The length between "-" is not fixed, can vary. I found an example on how to do it in Excel, https://www.ablebits.com/office-addins-blog/2015/10/07/excel-find-search-functions/. I wonder how to do it in JMP.


Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
ron_horne
Super User (Alumni)

Re: How to extract characters in occurrences of a certain character

hi jyw​,

there are many ways of doing this pending on your further use. if there is always the same delimiter (such as "-") this method should do the trick.

otherwise it is not robust.

best,

ron

New Table( "Untitled",

       Add Rows( 1 ),

       New Column( "Column 1", Character, Nominal, Set Values( {"JN-36M-GRNNC"} ) ),

       New Column( "Column 2",

              Character,

              Nominal,

              Formula( Word( 1, :Column 1, "-" ) )

       ),

       New Column( "Column 3",

              Character,

              Nominal,

              Formula( Word( 2, :Column 1, "-" ) )

       ),

       New Column( "Column 4",

              Character,

              Nominal,

              Formula( Word( 3, :Column 1, "-" ) )

       )

);

View solution in original post

2 REPLIES 2
ron_horne
Super User (Alumni)

Re: How to extract characters in occurrences of a certain character

hi jyw​,

there are many ways of doing this pending on your further use. if there is always the same delimiter (such as "-") this method should do the trick.

otherwise it is not robust.

best,

ron

New Table( "Untitled",

       Add Rows( 1 ),

       New Column( "Column 1", Character, Nominal, Set Values( {"JN-36M-GRNNC"} ) ),

       New Column( "Column 2",

              Character,

              Nominal,

              Formula( Word( 1, :Column 1, "-" ) )

       ),

       New Column( "Column 3",

              Character,

              Nominal,

              Formula( Word( 2, :Column 1, "-" ) )

       ),

       New Column( "Column 4",

              Character,

              Nominal,

              Formula( Word( 3, :Column 1, "-" ) )

       )

);

jyw
jyw
Level II

Re: How to extract characters in occurrences of a certain character

hi Ron,

This is great, I got it working as expected, thank you so much!

Recommended Articles