<?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: Searching string for multiple variations of a different string. in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75614#M21944</link>
    <description>The COMPRESS function comes to mind (to squeeze out unwanted characters within your test), given the limited example and conditions you have shown in your post.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Thu, 26 Feb 2009 17:44:02 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-02-26T17:44:02Z</dc:date>
    <item>
      <title>Searching string for multiple variations of a different string.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75613#M21943</link>
      <description>I'm trying to take this code and do it in one shot.  Instead of check 3 seperate times I want to know if it's possible to do it all in one line.&lt;BR /&gt;
&lt;BR /&gt;
data temp;&lt;BR /&gt;
length a b c 8 ;&lt;BR /&gt;
&lt;BR /&gt;
a= 1 ;&lt;BR /&gt;
b= 1 ;	&lt;BR /&gt;
c= 1 ;	&lt;BR /&gt;
&lt;BR /&gt;
if ( find(upcase(addr),'PO') &amp;gt; 0 ) Then a = 0 ;	&lt;BR /&gt;
if ( find(upcase(addr),'P O') &amp;gt; 0 ) Then b= 0 ;	&lt;BR /&gt;
if ( find(upcase(addr),'P.O.') &amp;gt; 0 ) Then c= 0 ;&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thank you for any help&lt;BR /&gt;
Jerry</description>
      <pubDate>Thu, 26 Feb 2009 14:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75613#M21943</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-26T14:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Searching string for multiple variations of a different string.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75614#M21944</link>
      <description>The COMPRESS function comes to mind (to squeeze out unwanted characters within your test), given the limited example and conditions you have shown in your post.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Thu, 26 Feb 2009 17:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75614#M21944</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-02-26T17:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Searching string for multiple variations of a different string.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75615#M21945</link>
      <description>Thanks for the tip.  It helped me clean it up.</description>
      <pubDate>Thu, 26 Feb 2009 18:02:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75615#M21945</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-26T18:02:31Z</dc:date>
    </item>
    <item>
      <title>Re: Searching string for multiple variations of a different string.</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75616#M21946</link>
      <description>Hi:&lt;BR /&gt;
  Other considerations might be whether you want to search for PO or P.O. within the first 4 or 5 characters of the address or anywhere in the address. For example:&lt;BR /&gt;
[pre]&lt;BR /&gt;
P.O. Box 66&lt;BR /&gt;
PO 333&lt;BR /&gt;
P O 222&lt;BR /&gt;
1234 Rumpole St&lt;BR /&gt;
4567 Popopo Blvd.&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
You would probably want the first 3, but not the last 2 (if you're looking for PO boxes). In which case, the SUBSTRING function might help limit the search to the first 4 or 5 characters of the address.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 26 Feb 2009 22:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Searching-string-for-multiple-variations-of-a-different-string/m-p/75616#M21946</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-02-26T22:29:21Z</dc:date>
    </item>
  </channel>
</rss>

