<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I have a list containing a combinations of letters ... e.g A B C D...
Column1
A
B
C
D
AB
AC
AD
ABC
ABD
..... so forth or as a list e.g. mylist = {A, B, C, D, AB, AC, AD, ABC, ABD....}.
While it is possible to find those cells starting with "AB" using Edit-Search-Find from the table menu, it is strange I cannot find a way to do this using JSL script.
I would imagine something like:
loc (mylist,"AB?") for a list or
current data table << get rows where (Column 1 == "AB?") for a data table
...should work but they don't.
Can anyone suggest a way to locate these values using a wildcard (i.e. AB?) or other clever ways to find these items and delete them?
Thank you in advance.
Beautiful! Thank you so much PMroz.
This is a perfect situation for using regular expressions. For a table you can use the REGEX function:
dt = open("$sample_data/Car Physical Data.jmp");
ch_rows = dt << get rows where(regex(:Model, "^Ch") == "Ch");
That code snippet will find all rows beginning with the string "Ch".