<?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 want to add space before numeric and after numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734360#M228782</link>
    <description>&lt;P&gt;Hi guys, I want to add particular number of white spaces in a string. Like suppose we have string "MESSAGE7676ASFD" . I want X number of spaces before numeric of "MESSAGE7676ASFD" then how can i do the same. Output should be like "MESSAGE&amp;nbsp; 7676&amp;nbsp; ASFD" =&amp;gt;&amp;nbsp; X spaces between MESS AGE&amp;nbsp; 7676&amp;nbsp; ASFD . Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Apr 2021 17:38:07 GMT</pubDate>
    <dc:creator>aanan1417</dc:creator>
    <dc:date>2021-04-15T17:38:07Z</dc:date>
    <item>
      <title>want to add space before numeric and after numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734360#M228782</link>
      <description>&lt;P&gt;Hi guys, I want to add particular number of white spaces in a string. Like suppose we have string "MESSAGE7676ASFD" . I want X number of spaces before numeric of "MESSAGE7676ASFD" then how can i do the same. Output should be like "MESSAGE&amp;nbsp; 7676&amp;nbsp; ASFD" =&amp;gt;&amp;nbsp; X spaces between MESS AGE&amp;nbsp; 7676&amp;nbsp; ASFD . Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 17:38:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734360#M228782</guid>
      <dc:creator>aanan1417</dc:creator>
      <dc:date>2021-04-15T17:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: want to add space before numeric and after numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734379#M228783</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Regular Expression Definition*/
/*1st Capturing Group (^[A-Za-z])*/
/*^ asserts position at start of a line*/
/*Match a single character present in the list below [A-Za-z]*/
/*+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed */
/*a-z matches a single character in the range between a  and z */
/*2nd Capturing Group ([0-9])*/
/*Match a single character present in the list below [0-9]*/
/*+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed */
/*0-9 matches a single character in the range between 0 (index 48) and 9 (index 57) */
/*3rd Capturing Group ([A-Za-z])*/
/*Match a single character present in the list below [A-Za-z]*/
/*+ matches the previous token between one and unlimited times, as many times as possible, giving back as needed */
/*a-z matches a single character in the range between a  and z */

data want;
	str="MESSAGE7676ASFD";
	str_new=prxchange("s/(^[a-z]+)([0-9]+)([a-z]+)/$1 $2 $3/io",-1,str);

	put (_all_) (=);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;40         data want;
41         	str="MESSAGE7676ASFD";
42         	str_new=prxchange("s/(^[a-z]+)([0-9]+)([a-z]+)/$1 $2 $3/io",-1,str);
43         
44         	put (_all_) (=);
45         run;

str=MESSAGE7676ASFD str_new=MESSAGE 7676 ASFD&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Apr 2021 18:01:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734379#M228783</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2021-04-15T18:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: want to add space before numeric and after numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734381#M228784</link>
      <description>&lt;P&gt;You can use the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/lefunctionsref/n0r8h2fa8djqf1n1cnenrvm573br.htm" target="_self"&gt;prxchange&lt;/A&gt;&amp;nbsp;function for this.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 18:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734381#M228784</guid>
      <dc:creator>JNR</dc:creator>
      <dc:date>2021-04-15T18:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: want to add space before numeric and after numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734401#M228795</link>
      <description>Thanks a ton</description>
      <pubDate>Thu, 15 Apr 2021 18:31:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/want-to-add-space-before-numeric-and-after-numeric/m-p/734401#M228795</guid>
      <dc:creator>aanan1417</dc:creator>
      <dc:date>2021-04-15T18:31:31Z</dc:date>
    </item>
  </channel>
</rss>

