<?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: How to search for a string between delimiters in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-search-for-a-string-between-delimiters/m-p/870677#M343903</link>
    <description>THANKS!!!</description>
    <pubDate>Thu, 20 Apr 2023 00:09:44 GMT</pubDate>
    <dc:creator>ChickenLittle</dc:creator>
    <dc:date>2023-04-20T00:09:44Z</dc:date>
    <item>
      <title>How to search for a string between delimiters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-search-for-a-string-between-delimiters/m-p/870674#M343900</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a field with a string of numbers separated by semicolons. I want to check if any of the numbers between the semicolons in this field is a match to what I am looking for. I know I can use "index" or "find," but it may give a false positive if it is a small number within a larger number. For example, if I have a field that contains 123;654;89 and I want to know if it contains '54', I do not want a false positive since 54 is in 654. How can I do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example of what I have:&lt;/P&gt;
&lt;P&gt;Obs&amp;nbsp; &amp;nbsp; &amp;nbsp;StrgOfNum&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 934;54;1234&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;123;6542;89&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want is to know if the number 54 is in any of the observations:&lt;/P&gt;
&lt;P&gt;Obs&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 &amp;lt;---Should return a positive output indicated it is in this observations&lt;/P&gt;
&lt;P&gt;2&amp;nbsp;&amp;lt;---Should return a negative output indicating it is not in this observations&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 23:17:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-search-for-a-string-between-delimiters/m-p/870674#M343900</guid>
      <dc:creator>ChickenLittle</dc:creator>
      <dc:date>2023-04-19T23:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a string between delimiters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-search-for-a-string-between-delimiters/m-p/870676#M343902</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
   string = '934;54;1234';
   found = findw(string, '54');
   output;
   put _all_;
   string = '123;6542;89';
   found = findw(string, '54');
   output;
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2023 23:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-search-for-a-string-between-delimiters/m-p/870676#M343902</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-04-19T23:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a string between delimiters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-search-for-a-string-between-delimiters/m-p/870677#M343903</link>
      <description>THANKS!!!</description>
      <pubDate>Thu, 20 Apr 2023 00:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-search-for-a-string-between-delimiters/m-p/870677#M343903</guid>
      <dc:creator>ChickenLittle</dc:creator>
      <dc:date>2023-04-20T00:09:44Z</dc:date>
    </item>
  </channel>
</rss>

