<?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: Deleting space between two words with prxchange in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637906#M189668</link>
    <description>&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'s/(\w+) \./\1./'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as the regular expression. \1 repeats the match from the first parenthesis.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2020 17:57:42 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2020-04-06T17:57:42Z</dc:date>
    <item>
      <title>Deleting space between two words with prxchange</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637896#M189662</link>
      <description>&lt;P&gt;Some of my variables have a space before the period, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;word .word
word .word&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I would like them to look like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;word.word
word.word&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm trying to use prxchange, but it's not working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;prxchange('s/ \w+ \./\w+\./', -1, variable);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What am I doing wrong??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 17:22:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637896#M189662</guid>
      <dc:creator>Caetreviop543</dc:creator>
      <dc:date>2020-04-06T17:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting space between two words with prxchange</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637905#M189667</link>
      <description>&lt;P&gt;Your REGEX is searching for periods, but your data has commas.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 17:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637905#M189667</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-04-06T17:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting space between two words with prxchange</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637906#M189668</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'s/(\w+) \./\1./'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as the regular expression. \1 repeats the match from the first parenthesis.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 17:57:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637906#M189668</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-04-06T17:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting space between two words with prxchange</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637907#M189669</link>
      <description>&lt;P&gt;If your are trying to remove a single space followed by a "." try :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;

want = prxchange('s/\s././', -1, "word .word");

put want =;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;26         data _null_;
27         
28         want = prxchange('s/\s././', -1, "word .word");
29         
30         put want =;
31         run;

want=word.word&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Apr 2020 18:02:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637907#M189669</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2020-04-06T18:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting space between two words with prxchange</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637914#M189671</link>
      <description>&lt;P&gt;For what it's worth, here is my stab at it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input var $20.;
cards;
word .word
word .word
;

data want;
 set have;
 want=prxchange('s/(\w+)\s\.(\w+)/$1.$2/', -1, var);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Apr 2020 18:31:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637914#M189671</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-04-06T18:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting space between two words with prxchange</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637927#M189676</link>
      <description>&lt;P&gt;Where does it have commas? The variables have a space, and then a period.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 19:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637927#M189676</guid>
      <dc:creator>Caetreviop543</dc:creator>
      <dc:date>2020-04-06T19:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting space between two words with prxchange</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637932#M189677</link>
      <description>&lt;P&gt;Thanks! Is the \ before the period to denote meta characters, only required for the first argument ('s/first argument/second argument', -1, variable) in prxchange?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 20:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Deleting-space-between-two-words-with-prxchange/m-p/637932#M189677</guid>
      <dc:creator>Caetreviop543</dc:creator>
      <dc:date>2020-04-06T20:04:47Z</dc:date>
    </item>
  </channel>
</rss>

