<?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 Replace colon : with a space using prxchange in a string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Replace-colon-with-a-space-using-prxchange-in-a-string/m-p/870509#M343813</link>
    <description>&lt;P&gt;Using&amp;nbsp;prxchange, how can I replace the : in the below string with a space. This is only an example of the string, so to make it as dynamic as possible please. i.e. the string may not be in this exact order, or it may be longer/shorter.&amp;nbsp; I only want to remove the colon between&amp;nbsp;3Sbvx6822:Mcnt8969, and leave the rest.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;have: {"var1":"0","var2":"3Sbvx6822:Mcnt8969","var3":"0","var4":"0","var5":"0"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want:&amp;nbsp;{"var1":"0","var2":"3Sbvx6822 Mcnt8969","var3":"0","var4":"0","var5":"0"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using the below code partially worked, but removed&amp;nbsp;3Sbvx6822: rather than just the :&lt;/P&gt;&lt;P&gt;prxchange('s/(\w+:)//oi', -1,trim(keyvaluepairs))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 09:37:56 GMT</pubDate>
    <dc:creator>94seanhogan</dc:creator>
    <dc:date>2023-04-19T09:37:56Z</dc:date>
    <item>
      <title>Replace colon : with a space using prxchange in a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-colon-with-a-space-using-prxchange-in-a-string/m-p/870509#M343813</link>
      <description>&lt;P&gt;Using&amp;nbsp;prxchange, how can I replace the : in the below string with a space. This is only an example of the string, so to make it as dynamic as possible please. i.e. the string may not be in this exact order, or it may be longer/shorter.&amp;nbsp; I only want to remove the colon between&amp;nbsp;3Sbvx6822:Mcnt8969, and leave the rest.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;have: {"var1":"0","var2":"3Sbvx6822:Mcnt8969","var3":"0","var4":"0","var5":"0"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;want:&amp;nbsp;{"var1":"0","var2":"3Sbvx6822 Mcnt8969","var3":"0","var4":"0","var5":"0"}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using the below code partially worked, but removed&amp;nbsp;3Sbvx6822: rather than just the :&lt;/P&gt;&lt;P&gt;prxchange('s/(\w+:)//oi', -1,trim(keyvaluepairs))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 09:37:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-colon-with-a-space-using-prxchange-in-a-string/m-p/870509#M343813</guid>
      <dc:creator>94seanhogan</dc:creator>
      <dc:date>2023-04-19T09:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Replace colon : with a space using prxchange in a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Replace-colon-with-a-space-using-prxchange-in-a-string/m-p/870518#M343816</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/314634"&gt;@94seanhogan&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities (as a first-time poster)!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could replace a string of word characters followed by a colon with that same string followed by a space:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;want=prxchange('s/(\w+):/$1 /',-1,keyvaluepairs);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or replace a colon, &lt;EM&gt;if&lt;/EM&gt; preceded by a word character, with a space:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;want=prxchange('s/(?&amp;lt;=\w):/ /',-1,keyvaluepairs);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Apr 2023 10:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Replace-colon-with-a-space-using-prxchange-in-a-string/m-p/870518#M343816</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2023-04-19T10:53:30Z</dc:date>
    </item>
  </channel>
</rss>

