<?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: PRX function usage issue in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PRX-function-usage-issue/m-p/666948#M199651</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76464"&gt;@s_lassen&lt;/a&gt;&amp;nbsp;, thanks very much, it works as expected.&lt;/P&gt;
&lt;P&gt;Looking at the solution helped me to understand better the logic of creating the right expression.&lt;/P&gt;</description>
    <pubDate>Sat, 04 Jul 2020 15:08:50 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2020-07-04T15:08:50Z</dc:date>
    <item>
      <title>PRX function usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-function-usage-issue/m-p/666937#M199643</link>
      <description>&lt;P&gt;I'm trying to learn the PRX functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to extract the area_code from a given phone number.&lt;/P&gt;
&lt;P&gt;Attached is my log showing the code and the result I got - not fitting&lt;/P&gt;
&lt;P&gt;to the expected area code '03'.&lt;/P&gt;
&lt;PRE&gt;73         data _null_;
 74             length area_code $3;
 75             phone = '03-6789021';
 76             prx_id = prxparse("/\(d+\)D/");
 77             pos = prxmatch(prx_ID, phone);
 78             area_code = prxposn(prx_id, 1, phone);
 79             put prx_id= pos= area_code=;
 80         run;
 
 prx_id=1 pos=0 area_code= 
 NOTE: DATA statement used (Total process time):
       real time           0.01 seconds
       cpu time            0.01 seconds&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The expression should look for any number of digits until first non digit character:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please fix my code and if possible some explanation to my error.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2020 12:54:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-function-usage-issue/m-p/666937#M199643</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-07-04T12:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: PRX function usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-function-usage-issue/m-p/666942#M199647</link>
      <description>&lt;P&gt;The problem is with the escape character ("\"). "\(" and "\)" look for the actual parantheses in the expression. And "d+" looks for the letter "d", repeated one or more times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try "&lt;SPAN&gt;/(\d+)\D/" instead.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2020 14:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-function-usage-issue/m-p/666942#M199647</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2020-07-04T14:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: PRX function usage issue</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-function-usage-issue/m-p/666948#M199651</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76464"&gt;@s_lassen&lt;/a&gt;&amp;nbsp;, thanks very much, it works as expected.&lt;/P&gt;
&lt;P&gt;Looking at the solution helped me to understand better the logic of creating the right expression.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2020 15:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-function-usage-issue/m-p/666948#M199651</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-07-04T15:08:50Z</dc:date>
    </item>
  </channel>
</rss>

