<?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: scan function for multple words in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347465#M80269</link>
    <description>&lt;P&gt;Maybe a regular expression?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;word = prxmatch('/is in|is not/i', title);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Apr 2017 16:56:48 GMT</pubDate>
    <dc:creator>collinelliot</dc:creator>
    <dc:date>2017-04-05T16:56:48Z</dc:date>
    <item>
      <title>scan function for multple words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347459#M80266</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for multple words within title.&amp;nbsp; I am not able to get this work. Please if you can help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; A;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;input&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; title $&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;39&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;datalines&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;A TALE OF TWO CITIES&lt;/P&gt;&lt;P&gt;GENERAL MANAGER IN ONE CITY&lt;/P&gt;&lt;P&gt;MANAGER IS IN ANOTHER CITY&lt;/P&gt;&lt;P&gt;MANAGER IS NOT IN THE CITY&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; work;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; A;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;WORD=FIND(title,(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"IS IN"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"IS NOT"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"i"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;); &lt;/FONT&gt;&lt;FONT color="#008000" face="Courier New" size="3"&gt;/**** "i" is to handle the case insensitive ****/&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 16:35:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347459#M80266</guid>
      <dc:creator>BonnaryW</dc:creator>
      <dc:date>2017-04-05T16:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: scan function for multple words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347465#M80269</link>
      <description>&lt;P&gt;Maybe a regular expression?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;word = prxmatch('/is in|is not/i', title);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2017 16:56:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347465#M80269</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-04-05T16:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: scan function for multple words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347466#M80270</link>
      <description>&lt;P&gt;I'm pretty sure you can only search for one string using FIND. What you want is something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FIND(title,"IS IN","i") or FIND(title,"IS NOT","i") &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2017 16:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347466#M80270</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-04-05T16:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: scan function for multple words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347470#M80272</link>
      <description>Thank you so much, it's work !!!&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:08:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347470#M80272</guid>
      <dc:creator>BonnaryW</dc:creator>
      <dc:date>2017-04-05T17:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: scan function for multple words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347471#M80273</link>
      <description>Thank you so much. It's work !!!&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:10:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347471#M80273</guid>
      <dc:creator>BonnaryW</dc:creator>
      <dc:date>2017-04-05T17:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: scan function for multple words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347472#M80274</link>
      <description>&lt;P&gt;If you have many of these combinations to search for it may be better to create a data set with the target string and then use SQL to find the matches.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data work.find;
   infile datalines truncover;
   input find $10.;
datalines;
Is in
is not
in one
;
run;

data work.A;
   input title $1-39;
datalines;
A TALE OF TWO CITIES
GENERAL MANAGER IN ONE CITY
MANAGER IS IN ANOTHER CITY
MANAGER IS NOT IN THE CITY
run;

proc sql;
   create table matched as
   select a.*, b.find, find(a.title,strip(b.find),'i') as word
   from work.a as a, work.find as b;
quit;
&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347472#M80274</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-05T17:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: scan function for multple words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347473#M80275</link>
      <description>Hello,&lt;BR /&gt;Thank you for replying with solution to my problem, I've accepted this answer as a solution.&lt;BR /&gt;&lt;BR /&gt;word = prxmatch('/is in|is not/i', title);&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Apr 2017 17:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-function-for-multple-words/m-p/347473#M80275</guid>
      <dc:creator>BonnaryW</dc:creator>
      <dc:date>2017-04-05T17:19:20Z</dc:date>
    </item>
  </channel>
</rss>

