<?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: Help with searching in string in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507388#M73685</link>
    <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 09:41:59 GMT</pubDate>
    <dc:creator>Yotam</dc:creator>
    <dc:date>2022-06-13T09:41:59Z</dc:date>
    <item>
      <title>Help with searching in string</title>
      <link>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507257#M73679</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have the following task to do.&lt;/P&gt;&lt;P&gt;Let's say I have 3 columns: A,B,C&lt;/P&gt;&lt;P&gt;Each cell in Col A is in the following format: 29;30;28;27;30; ...&lt;/P&gt;&lt;P&gt;So just random numbers separated by ;&lt;/P&gt;&lt;P&gt;Each cell in Col B&amp;nbsp;is in the following format: 4;5;1;3;6; ...&lt;/P&gt;&lt;P&gt;So these are numbers in the range of 1-25 (without repeating) in a random order, separated by ;&lt;/P&gt;&lt;P&gt;Col C is a single number in the range of 1-25, for example 3.&lt;/P&gt;&lt;P&gt;For any given row Col A and Col B have the same number of terms between the ";" (doesn't have to be the same in different rows).&lt;/P&gt;&lt;P&gt;And now to the task: I want to create a new column D, which contains the value from Col A found in the location of Col C in Col B.&lt;/P&gt;&lt;P&gt;For example, if&lt;/P&gt;&lt;P&gt;Col A =&amp;nbsp;29;30;28;27;30&lt;/P&gt;&lt;P&gt;Col B =&amp;nbsp;4;5;1;3;6&lt;/P&gt;&lt;P&gt;Col C = 3&lt;/P&gt;&lt;P&gt;Then Col D = 27&lt;/P&gt;&lt;P&gt;Because 3 is found in the 4th location in Col B (after the 3rd ;), and in the same location in Col A you can find 27.&lt;/P&gt;&lt;P&gt;I hope I explained it clearly, would appreciate any help. Please see attached file for example (I computed Col D manually for the example).&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:01:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507257#M73679</guid>
      <dc:creator>Yotam</dc:creator>
      <dc:date>2023-06-09T17:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with searching in string</title>
      <link>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507298#M73681</link>
      <description>&lt;P&gt;Should be fairly simple by using &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/list-functions.shtml?os=win&amp;amp;source=application#ww2491421" target="_blank" rel="noopener"&gt;Words()&lt;/A&gt; and &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/character-functions-2.shtml?os=win&amp;amp;source=application#ww2467451" target="_blank" rel="noopener"&gt;Contains()&lt;/A&gt;. &lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Num(Words(:A, ";")[Contains(Words(:B, ";"), Char(:C))]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1655108802518.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43190i669549D24552CC62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1655108802518.png" alt="jthi_0-1655108802518.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See scripting index for more examples about those functions&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 08:26:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507298#M73681</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-13T08:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with searching in string</title>
      <link>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507321#M73682</link>
      <description>&lt;P&gt;Here is one way to do it&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1655109564429.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43191iF342E067754D1ECF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1655109564429.png" alt="txnelson_0-1655109564429.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;theList = Words( :B, ";" );
location = Contains( theList, Char( :C ) );
Show( theList, location );
Try( Num( Word( location, :A, ";" ) ), . );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Jun 2022 08:40:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507321#M73682</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-06-13T08:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Help with searching in string</title>
      <link>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507388#M73685</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 09:41:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Help-with-searching-in-string/m-p/507388#M73685</guid>
      <dc:creator>Yotam</dc:creator>
      <dc:date>2022-06-13T09:41:59Z</dc:date>
    </item>
  </channel>
</rss>

