<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: extract a particular sting in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528858#M75237</link>
    <description>&lt;P&gt;If this is related to text parsing from &lt;LI-MESSAGE title="Import x and y values from the text file to jmp table and create wafer map" uid="518658" url="https://community.jmp.com/t5/Discussions/Import-x-and-y-values-from-the-text-file-to-jmp-table-and-create/m-p/518658#U518658" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; I would use different approach. But let's assume that we start with the existing data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would most likely use Regex if the pattern stays always the same:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/Bin table.jmp");
bins = {};
bin_rgx = "\[(?:BIN = \")(.*)(?:\" \d*)]\";

For Each Row(dt,
	If(Starts With(:Bins, "BIN = "),
		bin_str = Regex(:Bins, bin_rgx, "\1");
		Insert Into(bins, bin_str);
	);
);

show(bins);&amp;nbsp;//&amp;nbsp;bins = {".", "1", "2", "B", "P", "N", "A", "3", "F"};&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Aug 2022 15:08:23 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-08-01T15:08:23Z</dc:date>
    <item>
      <title>extract a particular sting</title>
      <link>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528831#M75236</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to extract the bin values from the rows and store in the list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example-&amp;nbsp;&lt;/P&gt;&lt;P&gt;BIN = "B" 8 "Bad Bump" -&amp;gt; I want to extract letter "B" from the string&amp;nbsp; and store in the list&lt;/P&gt;&lt;P&gt;BIN = "P" 6153 "PCM"&amp;nbsp;&amp;nbsp;-&amp;gt; I want to extract letter "P" from the string and store in the list and likewise for all the rows containing bin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I tried so far. It only extracts the row 13&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Clear Globals();
Clear Log();

dt = current data table();
asa = dt &amp;lt;&amp;lt; Get Rows Where (Contains(as column(3), "BIN") &amp;amp; Contains(as column(3), "NULL") == 0);

binlist = {};
startrownumber= asa[1];


for(k =1, k&amp;lt;= Nitems(asa), k++,

Insertinto(binlist, db_test:Bins[asa])
	
	
);
binvaluelist= {};


 for (i = startrownumber, i &amp;lt;= nitems(asa), i++,

	newlist = dt:Bins[i];
	
	word_list = words(newlist, "\!"\!"");
insertinto(binvaluelist, word_list);
	
);

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:06:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528831#M75236</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-06-09T17:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: extract a particular sting</title>
      <link>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528858#M75237</link>
      <description>&lt;P&gt;If this is related to text parsing from &lt;LI-MESSAGE title="Import x and y values from the text file to jmp table and create wafer map" uid="518658" url="https://community.jmp.com/t5/Discussions/Import-x-and-y-values-from-the-text-file-to-jmp-table-and-create/m-p/518658#U518658" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; I would use different approach. But let's assume that we start with the existing data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would most likely use Regex if the pattern stays always the same:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/Bin table.jmp");
bins = {};
bin_rgx = "\[(?:BIN = \")(.*)(?:\" \d*)]\";

For Each Row(dt,
	If(Starts With(:Bins, "BIN = "),
		bin_str = Regex(:Bins, bin_rgx, "\1");
		Insert Into(bins, bin_str);
	);
);

show(bins);&amp;nbsp;//&amp;nbsp;bins = {".", "1", "2", "B", "P", "N", "A", "3", "F"};&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Aug 2022 15:08:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528858#M75237</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-08-01T15:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: extract a particular sting</title>
      <link>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528863#M75238</link>
      <description>&lt;P&gt;Thanks &lt;SPAN&gt;Jarmo. It works&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 15:16:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528863#M75238</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2022-08-01T15:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: extract a particular sting</title>
      <link>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528876#M75239</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried on a different wafer and it doesn't work for some bins&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BINS = 4&lt;BR /&gt;BIN = "A" 2 "Alignment_Die"&lt;BR /&gt;BIN = "C" 28615 "D1QM1804101"&lt;BR /&gt;BIN = "D" 23501 "D1QM1804102"&lt;BR /&gt;BIN = "F" 0 "Fail" ""&lt;BR /&gt;BIN = "N" 0 "Not Tested"&lt;BR /&gt;BIN = "P" 2806 "PCM die" ""&lt;/P&gt;&lt;P&gt;&amp;nbsp;bins = {"A", "C", "D", "F\!" 0 \!"Fail", "N", "P\!" 2806 \!"PCM die"};&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = current data table();
bins = {};


bin_rgx = "\[(?:BIN = \")(.*)(?:\" \d*)]\";

For Each Row(dt,
	If(Starts With(:Bins, "BIN = "),
		bin_str = Regex(:Bins, bin_rgx, "\1");
		Insert Into(bins, bin_str);
	);
);

show(bins); //&amp;nbsp;bins = {"A", "C", "D", "F\!" 0 \!"Fail", "N", "P\!" 2806 \!"PCM die"};&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 15:37:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528876#M75239</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2022-08-01T15:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: extract a particular sting</title>
      <link>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528985#M75247</link>
      <description>&lt;P&gt;I would suggest testing out the regex either on JMP or on &lt;A href="https://regex101.com/r/DPngn1/1" target="_blank" rel="noopener"&gt;https://regex101.com/r/DPngn1/1&lt;/A&gt; . Choose one failing string and then test it out to see how and why it fails. In this case my regex pattern does require slight modification as it sometimes matches too much.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2022 17:50:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/extract-a-particular-sting/m-p/528985#M75247</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-08-01T17:50:42Z</dc:date>
    </item>
  </channel>
</rss>

