<?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 i want to extract data which is in between both -xxxx- in the variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257937#M49576</link>
    <description>&lt;P&gt;I have a variable and i want to extract data like example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var1&lt;/P&gt;
&lt;P&gt;kjjhf-0fdf-dfed&lt;/P&gt;
&lt;P&gt;asd-fdfk-dfcsf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to get data which is between the -&lt;/P&gt;
&lt;P&gt;var1&lt;/P&gt;
&lt;P&gt;0fdf&lt;/P&gt;
&lt;P&gt;fdfk&lt;/P&gt;</description>
    <pubDate>Mon, 21 Mar 2016 11:39:21 GMT</pubDate>
    <dc:creator>vraj1</dc:creator>
    <dc:date>2016-03-21T11:39:21Z</dc:date>
    <item>
      <title>i want to extract data which is in between both -xxxx- in the variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257937#M49576</link>
      <description>&lt;P&gt;I have a variable and i want to extract data like example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var1&lt;/P&gt;
&lt;P&gt;kjjhf-0fdf-dfed&lt;/P&gt;
&lt;P&gt;asd-fdfk-dfcsf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to get data which is between the -&lt;/P&gt;
&lt;P&gt;var1&lt;/P&gt;
&lt;P&gt;0fdf&lt;/P&gt;
&lt;P&gt;fdfk&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 11:39:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257937#M49576</guid>
      <dc:creator>vraj1</dc:creator>
      <dc:date>2016-03-21T11:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: i want to extract data which is in between both -xxxx- in the variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257938#M49577</link>
      <description>&lt;P&gt;SCAN() function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Scan(var, 2, '-');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Mar 2016 11:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257938#M49577</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-21T11:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: i want to extract data which is in between both -xxxx- in the variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257939#M49578</link>
      <description>&lt;P&gt;sorry, i gave a incomplete question. i also want space after scanning like&lt;/P&gt;
&lt;P&gt;var1&lt;/P&gt;
&lt;P&gt;kjd-fhf-asd&lt;/P&gt;
&lt;P&gt;dfsf-dfg-dwe&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i want like this&lt;/P&gt;
&lt;P&gt;var1&lt;/P&gt;
&lt;P&gt;fh f&lt;/P&gt;
&lt;P&gt;df g&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 11:44:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257939#M49578</guid>
      <dc:creator>vraj1</dc:creator>
      <dc:date>2016-03-21T11:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: i want to extract data which is in between both -xxxx- in the variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257942#M49579</link>
      <description>&lt;P&gt;Use substr() to extract the two parts and the CAT function to create new variable.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 12:18:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257942#M49579</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-21T12:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: i want to extract data which is in between both -xxxx- in the variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257946#M49581</link>
      <description>&lt;P&gt;It is a good idea to post your test data in the form of a datastep:&lt;/P&gt;
&lt;PRE&gt;data have;
  var1="kjd-fhf-asd"; output;
  var1="dfsf-dfg-dwe"; output;
run;
data want;
  set have;
  want=catx(' ',substr(scan(var1,2,"-"),1,2),substr(scan(var1,2,"-"),3,1));
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Mar 2016 13:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/i-want-to-extract-data-which-is-in-between-both-xxxx-in-the/m-p/257946#M49581</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-21T13:00:38Z</dc:date>
    </item>
  </channel>
</rss>

