cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

How do I isolate a character string of only numbers with varying starts and ends?

Hello,

 

I am trying to isolate only the 12 digit string for each Name to give me what you see in column Name 1. Is there a regex formula I could use to take care of the front and back end? Any help would be appreciated. Thanks!

jmp.PNG

1 REPLY 1
jthi
Super User

Re: How do I isolate a character string of only numbers with varying starts and ends?

something like \d{12} might work

Names Default To Here(1);

a = "0123456789123 123";
b = "123 0123456789123";

Show(Regex(a, "\d{12}"));
Show(Regex(b, "\d{12}"));

https://regex101.com/r/eDxvy8/1

-Jarmo

Recommended Articles