<?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 Find a string with number and anotther string with number after a conditional character between the in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Find-a-string-with-number-and-anotther-string-with-number-after/m-p/564039#M158183</link>
    <description>&lt;P&gt;Hi Dear All.&lt;BR /&gt;I'm looking to use sas functions ( not re) to find strings in a plain text.&lt;BR /&gt;&lt;BR /&gt;the text is like this :&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;data have:&lt;/U&gt;&lt;BR /&gt;some text blabla, bla right home num8, left home num7 bla bla bla&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;data want:&lt;/U&gt;&lt;BR /&gt;the variables&amp;nbsp;left home and right home have the respectives values of num8 nad num7&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;conditions :&lt;/U&gt;&lt;BR /&gt;1) the numbers allowed are 0-8&lt;BR /&gt;2) the separator between right home with num and the left home and num could be&lt;BR /&gt;a space&lt;BR /&gt;, ( comma)&lt;BR /&gt;.period&lt;BR /&gt;'and' word&lt;BR /&gt;3) blanks between string &lt;STRONG&gt;num&lt;/STRONG&gt; and &lt;STRONG&gt;0-8&lt;/STRONG&gt; numbers should be removed , sometimes the text could be like right home num 8 ( a space between num and &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;if there is no right home with num0-8 or left home with num0-8 found write in the respective variables 'not found'.&lt;BR /&gt;&lt;BR /&gt;Thanks for your response.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2019 11:39:14 GMT</pubDate>
    <dc:creator>SIgnificatif</dc:creator>
    <dc:date>2019-06-06T11:39:14Z</dc:date>
    <item>
      <title>Find a string with number and anotther string with number after a conditional character between the</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-a-string-with-number-and-anotther-string-with-number-after/m-p/564039#M158183</link>
      <description>&lt;P&gt;Hi Dear All.&lt;BR /&gt;I'm looking to use sas functions ( not re) to find strings in a plain text.&lt;BR /&gt;&lt;BR /&gt;the text is like this :&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;data have:&lt;/U&gt;&lt;BR /&gt;some text blabla, bla right home num8, left home num7 bla bla bla&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;data want:&lt;/U&gt;&lt;BR /&gt;the variables&amp;nbsp;left home and right home have the respectives values of num8 nad num7&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;conditions :&lt;/U&gt;&lt;BR /&gt;1) the numbers allowed are 0-8&lt;BR /&gt;2) the separator between right home with num and the left home and num could be&lt;BR /&gt;a space&lt;BR /&gt;, ( comma)&lt;BR /&gt;.period&lt;BR /&gt;'and' word&lt;BR /&gt;3) blanks between string &lt;STRONG&gt;num&lt;/STRONG&gt; and &lt;STRONG&gt;0-8&lt;/STRONG&gt; numbers should be removed , sometimes the text could be like right home num 8 ( a space between num and &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;if there is no right home with num0-8 or left home with num0-8 found write in the respective variables 'not found'.&lt;BR /&gt;&lt;BR /&gt;Thanks for your response.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 11:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-a-string-with-number-and-anotther-string-with-number-after/m-p/564039#M158183</guid>
      <dc:creator>SIgnificatif</dc:creator>
      <dc:date>2019-06-06T11:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: Find a string with number and anotther string with number after a conditional character between</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-a-string-with-number-and-anotther-string-with-number-after/m-p/564063#M158187</link>
      <description>&lt;P&gt;Your Source data and Desired Output is &amp;nbsp;not pretty clear, please give information clearly.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 12:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-a-string-with-number-and-anotther-string-with-number-after/m-p/564063#M158187</guid>
      <dc:creator>Riteshdell</dc:creator>
      <dc:date>2019-06-06T12:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Find a string with number and anotther string with number after a conditional character between</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-a-string-with-number-and-anotther-string-with-number-after/m-p/564083#M158194</link>
      <description>&lt;P&gt;Thank you for the message, here are the images and examples:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;

texto='some text blablasome text blablasome text blabla
some text blabla, bla right home num8, left home num7 bla bla bla
some text blabla
some text blabla etc ..';
data want;
set have;
 if findw(texto,"right home num8","i")&amp;gt;0 then rh = "num8";
 else if find(texto,"left home num7","i")&amp;gt;0 then lh = "num7";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;result:&lt;BR /&gt;rh =&lt;BR /&gt;lh= num7&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2019 13:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-a-string-with-number-and-anotther-string-with-number-after/m-p/564083#M158194</guid>
      <dc:creator>SIgnificatif</dc:creator>
      <dc:date>2019-06-06T13:31:01Z</dc:date>
    </item>
  </channel>
</rss>

