<?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: Flag words containing or made of numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448966#M283524</link>
    <description>&lt;P&gt;OK. Assuming I understood what you mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input;
have=_infile_;
pid=prxparse('/\d+/');
s=1;e=length(_infile_);
n=0;
call prxnext(pid,s,e,_infile_,p,l);
do while(p&amp;gt;0);
 n+1;
 call prxnext(pid,s,e,_infile_,p,l);
end;
keep have n;
cards;
(i)  145 SAINT-GEORGES #1107
(ii) 12 MIDDLEPORT CRESEN
(iii) 2040 ALGONQUIN RD UNIT114
(iv) BUREAU 106
;
run;

proc print noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 27 Mar 2018 13:19:49 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2018-03-27T13:19:49Z</dc:date>
    <item>
      <title>Flag words containing or made of numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448958#M283522</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone suggest a code /function to scan string and return num value when:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where any character within string where delimetor is 1 or more space, begin scanning: If contains or is made up of numeric, flag 1. This is to scan string related to addresses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Examples for variable Address1&lt;/P&gt;&lt;P&gt;(i)&amp;nbsp;&amp;nbsp;145 SAINT-GEORGES #1107&lt;/P&gt;&lt;P&gt;(ii)&amp;nbsp;12 MIDDLEPORT CRESEN&lt;/P&gt;&lt;P&gt;(iii)&amp;nbsp;2040 ALGONQUIN RD UNIT114&lt;/P&gt;&lt;P&gt;(iv)&amp;nbsp;BUREAU 106&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output&lt;/P&gt;&lt;P&gt;(i) 2&lt;EM&gt; [flags '145' as 1, and flags '&lt;SPAN&gt;#1107'&amp;nbsp;&lt;/SPAN&gt;as 1]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(ii) 1 &lt;EM&gt;[flags '12' as 1]&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(iii) 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(iv) 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks... I'm gonna review Perl and see what i can get.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 13:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448958#M283522</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2018-03-27T13:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Flag words containing or made of numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448965#M283523</link>
      <description>&lt;P&gt;The ANYDIGIT function will do what you want&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 13:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448965#M283523</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-03-27T13:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Flag words containing or made of numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448966#M283524</link>
      <description>&lt;P&gt;OK. Assuming I understood what you mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input;
have=_infile_;
pid=prxparse('/\d+/');
s=1;e=length(_infile_);
n=0;
call prxnext(pid,s,e,_infile_,p,l);
do while(p&amp;gt;0);
 n+1;
 call prxnext(pid,s,e,_infile_,p,l);
end;
keep have n;
cards;
(i)  145 SAINT-GEORGES #1107
(ii) 12 MIDDLEPORT CRESEN
(iii) 2040 ALGONQUIN RD UNIT114
(iv) BUREAU 106
;
run;

proc print noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Mar 2018 13:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448966#M283524</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-27T13:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Flag words containing or made of numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448967#M283525</link>
      <description>hello Mr Ksharp, a quick thank you for your tip! Also, you and others like R9, Astounding, etc.. are a real inspiration to study and practice SAS &amp;amp; coding!</description>
      <pubDate>Tue, 27 Mar 2018 13:23:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/448967#M283525</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2018-03-27T13:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Flag words containing or made of numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/449288#M283526</link>
      <description>&lt;P&gt;If you consider non-prx&amp;nbsp; way, the COUNTW() is the best choice .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input;
have=_infile_;
n=countw(have,,'kd');
keep have n;
cards;
(i)  145 SAINT-GEORGES #1107
(ii) 12 MIDDLEPORT CRESEN
(iii) 2040 ALGONQUIN RD UNIT114
(iv) BUREAU 106
;
run;

proc print noobs;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Mar 2018 12:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/449288#M283526</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-03-28T12:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Flag words containing or made of numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/449399#M283527</link>
      <description>hi Ksharp, thanks this works too</description>
      <pubDate>Wed, 28 Mar 2018 15:26:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flag-words-containing-or-made-of-numeric/m-p/449399#M283527</guid>
      <dc:creator>brulard</dc:creator>
      <dc:date>2018-03-28T15:26:47Z</dc:date>
    </item>
  </channel>
</rss>

