<?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: Like function in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666315#M199336</link>
    <description>Thank you, it worked also for me.I thougth that maybe there was another option to do that )</description>
    <pubDate>Wed, 01 Jul 2020 09:40:14 GMT</pubDate>
    <dc:creator>SASdevAnneMarie</dc:creator>
    <dc:date>2020-07-01T09:40:14Z</dc:date>
    <item>
      <title>Like function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666304#M199332</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question please.&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;Is it right to write the code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;where cd_produit like '%PE%GB%';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if I want to find the products like&amp;nbsp; &lt;STRONG&gt;&lt;EM&gt;PE01GB, PE33GB, PE67GB&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 08:34:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666304#M199332</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-07-01T08:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Like function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666311#M199334</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why don't you test it and check if it suits your needs ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input cd_produit $20.;
cards;
PE01GB
PE67GB
PA45GB
PE35GC
AAPE75GBCC
PEZZGB
;
run;

data want;
set have;
where cd_produit like '%PE%GB%';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jul 2020 09:07:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666311#M199334</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2020-07-01T09:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Like function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666312#M199335</link>
      <description>&lt;P&gt;See Maxim 4.&lt;/P&gt;
&lt;P&gt;Try It.&lt;/P&gt;
&lt;P&gt;Create fake data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input cd_produit $;
datalines;
PE01GB
PE33GB
PE67GB
XXXXXX
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and run your SQL on it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 09:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666312#M199335</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-01T09:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Like function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666315#M199336</link>
      <description>Thank you, it worked also for me.I thougth that maybe there was another option to do that )</description>
      <pubDate>Wed, 01 Jul 2020 09:40:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666315#M199336</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2020-07-01T09:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Like function</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666323#M199342</link>
      <description>&lt;P&gt;Glad it helped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are always many options and you have to consider if the retained solution always&lt;/P&gt;
&lt;P&gt;do what you expect. For instance, if your data contains products as "AAPEZZGBTT" they will match&lt;/P&gt;
&lt;P&gt;the condition 'like "%PE%GB%". If you want to check precisely that the string is "PE" followed by&lt;/P&gt;
&lt;P&gt;two digits followed by "GB", you can use a regexp as follows :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
where prxmatch("/^PE\d{2}GB$/", trim(cd_produit));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jul 2020 10:31:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Like-function/m-p/666323#M199342</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2020-07-01T10:31:59Z</dc:date>
    </item>
  </channel>
</rss>

