<?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: sas, remove the comma and period, regex in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/sas-remove-the-comma-and-period-regex/m-p/504392#M955</link>
    <description>&lt;P&gt;How did you make the string to begin with?&amp;nbsp; Why not just fix that step instead?&lt;/P&gt;
&lt;P&gt;You can use the FINDC() command to find the last character before the trailing commas and periods start.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  infile cards dsd truncover;
  input @1 have $100. @1 (id1-id20) (:$30.);
  want=catx(',', of id1-id20);
  loc=findc(have,' ,.',-1000,'k');
  want2=substrn(have,1,loc);
  put (_all_) (=/);
cards;
18430109646000104331929350001,064380958490001,974317618110001,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. 
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;have=18430109646000104331929350001,064380958490001,974317618110001,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.
id1=18430109646000104331929350001
id2=064380958490001
id3=974317618110001
id4=
id5=
id6=
id7=
id8=
id9=
id10=
id11=
id12=
id13=
id14=
id15=
id16=
id17=
id18=
id19=
id20=
want=18430109646000104331929350001,064380958490001,974317618110001
loc=61
want2=18430109646000104331929350001,064380958490001,974317618110001
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Oct 2018 17:43:46 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-10-15T17:43:46Z</dc:date>
    <item>
      <title>sas, remove the comma and period, regex</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-remove-the-comma-and-period-regex/m-p/504390#M954</link>
      <description>&lt;P&gt;Do you guys know how to replace remove the comma and period in something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Removed

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I had to concatenate to get list of claim numbers (with leading zeros). Now, I have that string but I want to delete all the stuff at the end. I tried this but it didn't work&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Removed&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;By the way, I am using SAS and regex, something like prxchange.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 15:51:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-remove-the-comma-and-period-regex/m-p/504390#M954</guid>
      <dc:creator>user112a2</dc:creator>
      <dc:date>2019-04-26T15:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: sas, remove the comma and period, regex</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-remove-the-comma-and-period-regex/m-p/504392#M955</link>
      <description>&lt;P&gt;How did you make the string to begin with?&amp;nbsp; Why not just fix that step instead?&lt;/P&gt;
&lt;P&gt;You can use the FINDC() command to find the last character before the trailing commas and periods start.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  infile cards dsd truncover;
  input @1 have $100. @1 (id1-id20) (:$30.);
  want=catx(',', of id1-id20);
  loc=findc(have,' ,.',-1000,'k');
  want2=substrn(have,1,loc);
  put (_all_) (=/);
cards;
18430109646000104331929350001,064380958490001,974317618110001,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. 
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;have=18430109646000104331929350001,064380958490001,974317618110001,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.
id1=18430109646000104331929350001
id2=064380958490001
id3=974317618110001
id4=
id5=
id6=
id7=
id8=
id9=
id10=
id11=
id12=
id13=
id14=
id15=
id16=
id17=
id18=
id19=
id20=
want=18430109646000104331929350001,064380958490001,974317618110001
loc=61
want2=18430109646000104331929350001,064380958490001,974317618110001
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 17:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-remove-the-comma-and-period-regex/m-p/504392#M955</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-10-15T17:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: sas, remove the comma and period, regex</title>
      <link>https://communities.sas.com/t5/New-SAS-User/sas-remove-the-comma-and-period-regex/m-p/504442#M974</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/225082"&gt;@user112a2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Do you guys know how to replace remove the comma and period in something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;'18430109646000104331929350001,064380958490001,974317618110001,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,. '

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I had to concatenate to get list of claim numbers (with leading zeros). Now, I have that string but I want to delete all the stuff at the end. I tried this but it didn't work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data OUT.REQ_1_4_25 ;
set OUT.REQ_1_4_24;
CONCAT1=PRXCHANGE('s/,.//',1,CONCAT);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;By the way, I am using SAS and regex, something like prxchange.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And another reason why I ask every time someone does this "Why?". I have a very hard time understanding what is improved by this time of variable creation unless it is the very last step prior to printing for human readability.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 19:24:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/sas-remove-the-comma-and-period-regex/m-p/504442#M974</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-10-15T19:24:21Z</dc:date>
    </item>
  </channel>
</rss>

