<?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: Exclude records with a '-' in the variable value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957971#M373919</link>
    <description>&lt;P&gt;Thanks you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I figured it out.&lt;/P&gt;&lt;P&gt;Thanks you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;for your suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2025 00:41:37 GMT</pubDate>
    <dc:creator>SASMom2</dc:creator>
    <dc:date>2025-02-03T00:41:37Z</dc:date>
    <item>
      <title>Exclude records with a '-' in the variable value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957966#M373914</link>
      <description>&lt;P&gt;I need help to exclude records with a variable that has values other than numbers and characters. Below is an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a variable 'test' which has values like below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="batang,apple gothic" size="2"&gt;Test&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="batang,apple gothic" size="2"&gt;00*915174&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="batang,apple gothic" size="2"&gt;00*915174&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="batang,apple gothic" size="2"&gt;(00)-1234&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="batang,apple gothic" size="2"&gt;00(9151.74)&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="batang,apple gothic" size="2"&gt;00_915_174&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="batang,apple gothic" size="2"&gt;00-9151-74&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT face="batang,apple gothic" size="2"&gt;001234&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above column, I would like to exclude all the values with special character such as (, ), -, ., * and space. I want to keep values such as '001234' or 'ABC123'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Feb 2025 21:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957966#M373914</guid>
      <dc:creator>SASMom2</dc:creator>
      <dc:date>2025-02-02T21:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude records with a '-' in the variable value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957967#M373915</link>
      <description>&lt;P&gt;It sounds to me like you could re-phrase the requirements to keep strings which contain digits or numbers, but not anything else.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;And so this is a job for the &lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/lefunctionsref/n1mdh2gvd5potjn14jipysvzn4o7.htm" target="_self"&gt;FINDC function&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if findc(test,,'kad') then delete;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 02 Feb 2025 21:29:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957967#M373915</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-02-02T21:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude records with a '-' in the variable value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957968#M373916</link>
      <description>&lt;P&gt;I feel so dumb asking this but still asking...what is 'kad' in your statement.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 02 Feb 2025 21:46:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957968#M373916</guid>
      <dc:creator>SASMom2</dc:creator>
      <dc:date>2025-02-02T21:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude records with a '-' in the variable value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957969#M373917</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/283628"&gt;@SASMom2&lt;/a&gt;&amp;nbsp; - Click on the FINDC documentation link provided by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;and you will find what 'kad' means.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Feb 2025 23:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957969#M373917</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2025-02-02T23:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude records with a '-' in the variable value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957971#M373919</link>
      <description>&lt;P&gt;Thanks you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I figured it out.&lt;/P&gt;&lt;P&gt;Thanks you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;for your suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 00:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957971#M373919</guid>
      <dc:creator>SASMom2</dc:creator>
      <dc:date>2025-02-03T00:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude records with a '-' in the variable value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957973#M373920</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input test $20.;
cards;
00*915174
00*915174
(00)-1234
00(9151.74)
00_915_174
00-9151-74
001234
ABC123
;
data want;
 set have;
 if notalnum(strip(test)) then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Feb 2025 00:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/957973#M373920</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-02-03T00:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Exclude records with a '-' in the variable value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/958004#M373934</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    retain re_pattern;
    if _N_ = 1 then re_pattern = prxparse('/^[A-Za-z0-9]+$/');
    if prxmatch(re_pattern, strip(test)) then output;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    if not prxmatch('/^[a-zA-Z0-9]+$/', strip(test)) then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Feb 2025 12:24:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Exclude-records-with-a-in-the-variable-value/m-p/958004#M373934</guid>
      <dc:creator>webart999ARM</dc:creator>
      <dc:date>2025-02-03T12:24:16Z</dc:date>
    </item>
  </channel>
</rss>

