cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
twillkickers
Level III

Only select rows where the first character of the contained string is a number, not a letter

How can I use JSL to only select rows that contain a string that begins with a number, while ignoring strings that begin with a letter?

1 ACCEPTED SOLUTION

Accepted Solutions
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Only select rows where the first character of the contained string is a number, not a letter

There are several ways to do this. Here are two examples. 

 

dt << select where(!Is Missing(Num(Left(:data[], 1))));

dt << select where(!Is Missing(Regex(Left(:data[], 1), "^\d")));

View solution in original post

1 REPLY 1
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Only select rows where the first character of the contained string is a number, not a letter

There are several ways to do this. Here are two examples. 

 

dt << select where(!Is Missing(Num(Left(:data[], 1))));

dt << select where(!Is Missing(Regex(Left(:data[], 1), "^\d")));