<?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 how to extract the valuew which are  in parentheses in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408658#M99791</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a string of characters and I need those values in parentheses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;data title;&lt;BR /&gt;input title $20.;&lt;BR /&gt;datalines;&lt;BR /&gt;National Geography (NG)&lt;BR /&gt;Time (T)&lt;BR /&gt;National Food and Energy Council (NFC)&lt;BR /&gt;Food and Drug Administration (FDA)&lt;BR /&gt;National Hockey League (NHL)&lt;BR /&gt;National Football League (NFL)&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The results I want are:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;T&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NFC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NHL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NFL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the help!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2017 13:49:11 GMT</pubDate>
    <dc:creator>daisy6</dc:creator>
    <dc:date>2017-10-30T13:49:11Z</dc:date>
    <item>
      <title>how to extract the valuew which are  in parentheses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408658#M99791</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a string of characters and I need those values in parentheses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;data title;&lt;BR /&gt;input title $20.;&lt;BR /&gt;datalines;&lt;BR /&gt;National Geography (NG)&lt;BR /&gt;Time (T)&lt;BR /&gt;National Food and Energy Council (NFC)&lt;BR /&gt;Food and Drug Administration (FDA)&lt;BR /&gt;National Hockey League (NHL)&lt;BR /&gt;National Football League (NFL)&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The results I want are:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NG&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;T&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NFC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NHL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NFL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for the help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 13:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408658#M99791</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2017-10-30T13:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the valuew which are  in parentheses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408663#M99794</link>
      <description>&lt;P&gt;If they always are at the end this is a quicky:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;newTitle = compress(reverse(scan(reverse(title),1)),'()');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Untested, but should work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;//Fredrik&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 13:55:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408663#M99794</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2017-10-30T13:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the valuew which are  in parentheses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408665#M99795</link>
      <description>&lt;P&gt;This takes the first set of characters in parentheses, and doesn't consider whether there might be other sets of parentheses:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;newvar = scan(oldvar, 2, '()');&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 14:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408665#M99795</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-10-30T14:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the valuew which are  in parentheses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408673#M99796</link>
      <description>&lt;P&gt;Thanks for that! It works!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 14:05:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408673#M99796</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2017-10-30T14:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the valuew which are  in parentheses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408675#M99798</link>
      <description>&lt;P&gt;Thanks for reply. It works !&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 14:06:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408675#M99798</guid>
      <dc:creator>daisy6</dc:creator>
      <dc:date>2017-10-30T14:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract the valuew which are  in parentheses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408676#M99799</link>
      <description>&lt;PRE&gt;
data title;
input title $40.;
if findc(title,')','b')=length(title) then want=scan(title,-1,'() ') ;
datalines;
National Geography (NG)
Time (T)
National Food and Energy Council (NFC)
Food and Drug Administration (FDA)
National Hockey League (NHL)
National Football League (NFL)
;
run;

&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Oct 2017 14:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-extract-the-valuew-which-are-in-parentheses/m-p/408676#M99799</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-10-30T14:13:48Z</dc:date>
    </item>
  </channel>
</rss>

