<?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: Select Where(Contains()) Usage in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107062#M39088</link>
    <description>&lt;P&gt;Another option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

dt = New Table( "Select by Criterion",
	New Column( "Text", Character, Values( { "a", "a12", "absent" } ) )
);

dt &amp;lt;&amp;lt; Select Where(
	Not( Is Missing( Regex( :Text[], "a\d+" ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 18 Jan 2019 13:37:39 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2019-01-18T13:37:39Z</dc:date>
    <item>
      <title>Select Where(Contains()) Usage</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107000#M39079</link>
      <description>&lt;P&gt;I often find&amp;nbsp;that the Contains() function inside the Select Where() function can be convenient. What if I would like to select all rows where a designated column contains the string "a" when it is followed by a number? For example, in a column with the values "a", "a12", and "absent", only the row with "a12" would be selected. Thanks for any tips!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jan 2019 21:11:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107000#M39079</guid>
      <dc:creator>twillkickers</dc:creator>
      <dc:date>2019-01-17T21:11:58Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where(Contains()) Usage</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107003#M39080</link>
      <description>&lt;P&gt;This will work if the numbers are only after the first occurance of the letter "a"&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; select where(contains(:name,"a") &amp;amp; 
IsMissing(num(substr(:name,contains(:name,"a")+1,1)))==0);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Jan 2019 22:53:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107003#M39080</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-01-17T22:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where(Contains()) Usage</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107062#M39088</link>
      <description>&lt;P&gt;Another option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

dt = New Table( "Select by Criterion",
	New Column( "Text", Character, Values( { "a", "a12", "absent" } ) )
);

dt &amp;lt;&amp;lt; Select Where(
	Not( Is Missing( Regex( :Text[], "a\d+" ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Jan 2019 13:37:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107062#M39088</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-01-18T13:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select Where(Contains()) Usage</title>
      <link>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107087#M39100</link>
      <description>&lt;P&gt;Nice clean solution Mark.&amp;nbsp; Gotta love those regular expressions.&amp;nbsp; I'm curious why you have [] after :Text?&amp;nbsp; Seems to work without it.&lt;/P&gt;
&lt;P&gt;BTW this also works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Select Where(
	Regex( :Text, "a\d+" ) == :Text
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Jan 2019 18:33:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Select-Where-Contains-Usage/m-p/107087#M39100</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2019-01-18T18:33:05Z</dc:date>
    </item>
  </channel>
</rss>

