<?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 1st occurance of space to be removed (Space removal from string) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/1st-occurance-of-space-to-be-removed-Space-removal-from-string/m-p/664231#M198401</link>
    <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I have a column such like below:&lt;/P&gt;
&lt;P&gt;9&amp;nbsp; years&lt;BR /&gt;1&amp;nbsp; Week&lt;BR /&gt;0 6 year&lt;BR /&gt;1 0 Months&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; YEAR 7 MONTHS&lt;BR /&gt;5&amp;nbsp; YEARS&lt;BR /&gt;1&amp;nbsp; YEAR 6 MONTHS&lt;/P&gt;
&lt;P&gt;I've some places double or single blanks in the ist space. I would like to remove the ist occuring space(if there are 2 spaces, 1 space to nospace. How to do achieve this? one such example could be:&amp;nbsp; 1 0 years should be&amp;nbsp; 10 years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jun 2020 10:46:55 GMT</pubDate>
    <dc:creator>sahoositaram555</dc:creator>
    <dc:date>2020-06-23T10:46:55Z</dc:date>
    <item>
      <title>1st occurance of space to be removed (Space removal from string)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/1st-occurance-of-space-to-be-removed-Space-removal-from-string/m-p/664231#M198401</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;I have a column such like below:&lt;/P&gt;
&lt;P&gt;9&amp;nbsp; years&lt;BR /&gt;1&amp;nbsp; Week&lt;BR /&gt;0 6 year&lt;BR /&gt;1 0 Months&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; YEAR 7 MONTHS&lt;BR /&gt;5&amp;nbsp; YEARS&lt;BR /&gt;1&amp;nbsp; YEAR 6 MONTHS&lt;/P&gt;
&lt;P&gt;I've some places double or single blanks in the ist space. I would like to remove the ist occuring space(if there are 2 spaces, 1 space to nospace. How to do achieve this? one such example could be:&amp;nbsp; 1 0 years should be&amp;nbsp; 10 years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 10:46:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/1st-occurance-of-space-to-be-removed-Space-removal-from-string/m-p/664231#M198401</guid>
      <dc:creator>sahoositaram555</dc:creator>
      <dc:date>2020-06-23T10:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: 1st occurance of space to be removed (Space removal from string)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/1st-occurance-of-space-to-be-removed-Space-removal-from-string/m-p/664234#M198402</link>
      <description>You can use compbl function which will compress the double blanks to single blanks &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;compbl(var)&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Jun 2020 11:00:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/1st-occurance-of-space-to-be-removed-Space-removal-from-string/m-p/664234#M198402</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-06-23T11:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: 1st occurance of space to be removed (Space removal from string)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/1st-occurance-of-space-to-be-removed-Space-removal-from-string/m-p/664235#M198403</link>
      <description>&lt;P&gt;This will always remove the first space:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT; 
  set HAVE;
  STR1 = prxchange('s/ //',1,STR);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;&lt;A name="IDX" target="_blank"&gt;&lt;/A&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.WANT" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="l header" scope="col"&gt;STR&lt;/TH&gt;
&lt;TH class="l header" scope="col"&gt;STR1&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;9&amp;nbsp; years&lt;/TD&gt;
&lt;TD class="l data"&gt;9 years&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;1&amp;nbsp; Week&lt;/TD&gt;
&lt;TD class="l data"&gt;1 Week&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;0 6 year&lt;/TD&gt;
&lt;TD class="l data"&gt;06 year&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;1 0 Months&lt;/TD&gt;
&lt;TD class="l data"&gt;10 Months&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;1&amp;nbsp; YEAR 7 MONTHS&lt;/TD&gt;
&lt;TD class="l data"&gt;1 YEAR 7 MONTHS&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;5&amp;nbsp; YEARS&lt;/TD&gt;
&lt;TD class="l data"&gt;5 YEARS&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;1 YEAR 6 MONTHS&lt;/TD&gt;
&lt;TD class="l data"&gt;1 YEAR 6 MONTHS&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jun 2020 11:08:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/1st-occurance-of-space-to-be-removed-Space-removal-from-string/m-p/664235#M198403</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-06-23T11:08:06Z</dc:date>
    </item>
  </channel>
</rss>

