<?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: Select a specific interval in string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587679#M167867</link>
    <description>&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input string&amp;amp;$100.;
want=prxchange('s/(.*origin)(.*)(FACTS\s)/$2/i',-1,string);
cards;
PROCESS ORIGIN sas communities FACTS
PROCESS ORIGIN Google Inc FACTS
PROCESS ORIGIN Google FACTS
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 10 Sep 2019 21:01:42 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2019-09-10T21:01:42Z</dc:date>
    <item>
      <title>Select a specific interval in string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587672#M167865</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know, if is possible to select the word in a specific interval string.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Ex: Variable name: Comments&lt;BR /&gt;I need select the words between PROCESS ORIGIN&amp;nbsp; and FACTS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROCESS ORIGIN&amp;nbsp;sas communities&amp;nbsp;FACTS&lt;/P&gt;&lt;P&gt;PROCESS ORIGIN&amp;nbsp;Google Inc&amp;nbsp;FACTS&lt;/P&gt;&lt;P&gt;PROCESS ORIGIN&amp;nbsp;Google FACTS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx !!!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2019 20:22:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587672#M167865</guid>
      <dc:creator>Sk1_SAS</dc:creator>
      <dc:date>2019-09-10T20:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: Select a specific interval in string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587679#M167867</link>
      <description>&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input string&amp;amp;$100.;
want=prxchange('s/(.*origin)(.*)(FACTS\s)/$2/i',-1,string);
cards;
PROCESS ORIGIN sas communities FACTS
PROCESS ORIGIN Google Inc FACTS
PROCESS ORIGIN Google FACTS
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Sep 2019 21:01:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587679#M167867</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2019-09-10T21:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select a specific interval in string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587725#M167883</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=_:);
  input string&amp;amp;$100.;
  length want $80;
  retain _re;

  if _n_=1 then
    _re=prxparse('/\bprocess origin\b(.*)\bfacts\b/oi');

  if prxmatch(_re, trim(string)) then
    do;
      want=prxposn(_re, 1, string);
    end;

  cards;
PROCESS ORIGIN sas communities FACTS
PROCESS ORIGIN Google Inc FACTS
PROCESS ORIGIN Google FACTS
Process Original Mix by Wehbba facts
blah PROCESS ORIGIN Google Inc FACTS
blah PROCESS ORIGIN Google Inc xxFACTS
blah PROCESS ORIGIN Google Inc FACTSxx
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 06:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587725#M167883</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-11T06:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Select a specific interval in string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587854#M167921</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 13:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Select-a-specific-interval-in-string/m-p/587854#M167921</guid>
      <dc:creator>Sk1_SAS</dc:creator>
      <dc:date>2019-09-11T13:40:53Z</dc:date>
    </item>
  </channel>
</rss>

