<?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: Find Text in a Column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501454#M133701</link>
    <description>&lt;P&gt;use FIND() or INDEX() function if you need to search for a single word. If you have to search for multiple words then use PRXMATCH() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If FIND(item,'shoe','i')&amp;gt;0 then shoes='YES';else shoes='NO';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Oct 2018 13:05:27 GMT</pubDate>
    <dc:creator>SuryaKiran</dc:creator>
    <dc:date>2018-10-04T13:05:27Z</dc:date>
    <item>
      <title>Find Text in a Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501453#M133700</link>
      <description>&lt;P&gt;Greetings Community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a very simple/quick question:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a column of the data that contains text. Within that text, I need to look if there is a specific text. My data looks like this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Item&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12345B&lt;/TD&gt;&lt;TD&gt;Tennis Shoes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2325hg&lt;/TD&gt;&lt;TD&gt;Socks&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SD4587&lt;/TD&gt;&lt;TD&gt;XYZ Shoe&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D235F&lt;/TD&gt;&lt;TD&gt;Other&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the new data to look like this (please note the third observation is shoe and not shoes):&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Item&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Shoes&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12345B&lt;/TD&gt;&lt;TD&gt;Tennis Shoes&lt;/TD&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2325hg&lt;/TD&gt;&lt;TD&gt;Socks&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SD4587&lt;/TD&gt;&lt;TD&gt;XYZ Shoe&lt;/TD&gt;&lt;TD&gt;Yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D235F&lt;/TD&gt;&lt;TD&gt;Other&lt;/TD&gt;&lt;TD&gt;No&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 13:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501453#M133700</guid>
      <dc:creator>altijani</dc:creator>
      <dc:date>2018-10-04T13:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Find Text in a Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501454#M133701</link>
      <description>&lt;P&gt;use FIND() or INDEX() function if you need to search for a single word. If you have to search for multiple words then use PRXMATCH() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If FIND(item,'shoe','i')&amp;gt;0 then shoes='YES';else shoes='NO';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 13:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501454#M133701</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-10-04T13:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Find Text in a Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501455#M133702</link>
      <description>&lt;P&gt;Does case matter, i.e. does shoes=Shoes?&amp;nbsp; If so you might want to upcase.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if index(upcase(item),"SHOES") then shoes="Yes";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am sure this isn't your full problem though is it?&amp;nbsp; Only one word being checked?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 13:09:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501455#M133702</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-04T13:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Find Text in a Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501470#M133706</link>
      <description>&lt;P&gt;Right. I just needed a lead for this issue. It is much more than that.&lt;/P&gt;&lt;P&gt;Many thanks though&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 13:36:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-Text-in-a-Column/m-p/501470#M133706</guid>
      <dc:creator>altijani</dc:creator>
      <dc:date>2018-10-04T13:36:55Z</dc:date>
    </item>
  </channel>
</rss>

