<?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 Isolate records with double blank, then comma; or comma then double blank in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Isolate-records-with-double-blank-then-comma-or-comma-then/m-p/634547#M188338</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a name variable where most values are Last, First.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to examine records where the name value contains two blanks followed by a comma OR a comma followed by two blanks (ie, the comma has two blanks on at least one side). This is what I have set up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data = have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; var namevar;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; where index(namevar, ',')&amp;gt;0 and (index(namevar, '&amp;nbsp; ,') &amp;gt;0 or index(namevar, ',&amp;nbsp; ')&amp;gt;0));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The step ran but did not produce what I thought it would. I didn't see what I was looking for: a double blank followed by a comma, or a comma followed by a double blank. Instead I only saw one or zero blanks adjacent to the columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should this be working? If not, is there a different approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Mar 2020 19:56:43 GMT</pubDate>
    <dc:creator>Walternate</dc:creator>
    <dc:date>2020-03-24T19:56:43Z</dc:date>
    <item>
      <title>Isolate records with double blank, then comma; or comma then double blank</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Isolate-records-with-double-blank-then-comma-or-comma-then/m-p/634547#M188338</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a name variable where most values are Last, First.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to examine records where the name value contains two blanks followed by a comma OR a comma followed by two blanks (ie, the comma has two blanks on at least one side). This is what I have set up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data = have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; var namevar;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; where index(namevar, ',')&amp;gt;0 and (index(namevar, '&amp;nbsp; ,') &amp;gt;0 or index(namevar, ',&amp;nbsp; ')&amp;gt;0));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The step ran but did not produce what I thought it would. I didn't see what I was looking for: a double blank followed by a comma, or a comma followed by a double blank. Instead I only saw one or zero blanks adjacent to the columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Should this be working? If not, is there a different approach?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 19:56:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Isolate-records-with-double-blank-then-comma-or-comma-then/m-p/634547#M188338</guid>
      <dc:creator>Walternate</dc:creator>
      <dc:date>2020-03-24T19:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Isolate records with double blank, then comma; or comma then double blank</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Isolate-records-with-double-blank-then-comma-or-comma-then/m-p/634551#M188341</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37814"&gt;@Walternate&lt;/a&gt;&amp;nbsp; &amp;nbsp;Try Regex. A sample data for us to play with would have been nice.&lt;/P&gt;
&lt;P&gt;For&amp;nbsp;&lt;SPAN&gt;two blanks followed by a comma&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Regex would be : \s (any white space)&amp;nbsp; quantifier needed is 2 , so regex {2} followed by a comma&lt;STRONG&gt; ,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Something like the below&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#339966"&gt;\s{2},&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2020 20:02:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Isolate-records-with-double-blank-then-comma-or-comma-then/m-p/634551#M188341</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-03-24T20:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Isolate records with double blank, then comma; or comma then double blank</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Isolate-records-with-double-blank-then-comma-or-comma-then/m-p/634573#M188348</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data = have;
var namevar;
where prxMatch("/  ,|,  /", namevar);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Mar 2020 20:55:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Isolate-records-with-double-blank-then-comma-or-comma-then/m-p/634573#M188348</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2020-03-24T20:55:13Z</dc:date>
    </item>
  </channel>
</rss>

