<?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 / substrings in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231280#M42052</link>
    <description>&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select distinct(prxchange('s/(^\w+)\W+?.*/$1/i',1,text)) as string from want;&lt;BR /&gt;quit;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Oct 2015 23:07:36 GMT</pubDate>
    <dc:creator>slchen</dc:creator>
    <dc:date>2015-10-22T23:07:36Z</dc:date>
    <item>
      <title>PRX / substrings</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231270#M42048</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;My input field is something like this -&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;ALICE REV 2-KY/CB&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;ALICE-REV 2/BHP&lt;BR /&gt;Audition/BTT&lt;BR /&gt;Audition-CK/BT&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and my output field needs to be somehting like this -&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;ALICE&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Audition&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a vague idea about PRX functions. Any help will be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;saspert&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 21:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231270#M42048</guid>
      <dc:creator>saspert</dc:creator>
      <dc:date>2015-10-22T21:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: PRX / substrings</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231273#M42049</link>
      <description>&lt;P&gt;Have a go with this sample, check the doc for the &lt;A href="https://support.sas.com/documentation/cdl/en/lefunctionsref/67960/HTML/default/viewer.htm#p0s9ilagexmjl8n1u7e1t1jfnzlk.htm" target="_self"&gt;Tables of Perl Regular Expression (PRX) Metacharacters&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile cards ;
  input text $64.;

  wordEnd = prxmatch("/\W+\b/", text);
  word = substr(text, 1, wordEnd-1);
  putlog _all_;
cards;
ALICE REV 2-KY/CB 
ALICE-REV 2/BHP
Audition/BTT
Audition-CK/BT
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 22:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231273#M42049</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2015-10-22T22:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: PRX / substrings</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231278#M42051</link>
      <description>&lt;P&gt;If you know the delimiters that might appear in your data, you can code this simply:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;string = scan(string, 1, '- /');&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Be sure to include a blank as one of the delimiters.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 22:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231278#M42051</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-10-22T22:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: PRX / substrings</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231280#M42052</link>
      <description>&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select distinct(prxchange('s/(^\w+)\W+?.*/$1/i',1,text)) as string from want;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 23:07:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-substrings/m-p/231280#M42052</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2015-10-22T23:07:36Z</dc:date>
    </item>
  </channel>
</rss>

