<?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 PERL expression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PERL-expression/m-p/165564#M31947</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can someone give me the perl expression to always capture the code between BE and XX instead of substr function ?&lt;/P&gt;&lt;P&gt;it start always at pos 6 but length can vary, ending is also always with XXX to complete total length of 11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;a;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;length &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;c023 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$11.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ; &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp; c023=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;'400BE88XX'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp; ba=substr(c023,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;+index(c023,&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;'X'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;GreetZ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Herman&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Feb 2014 16:41:32 GMT</pubDate>
    <dc:creator>Jaheuk</dc:creator>
    <dc:date>2014-02-06T16:41:32Z</dc:date>
    <item>
      <title>PERL expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERL-expression/m-p/165564#M31947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can someone give me the perl expression to always capture the code between BE and XX instead of substr function ?&lt;/P&gt;&lt;P&gt;it start always at pos 6 but length can vary, ending is also always with XXX to complete total length of 11&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;data &lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;a;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;length &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;c023 &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$11.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ; &lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp; c023=&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;'400BE88XX'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp; ba=substr(c023,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;,-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;6&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;+index(c023,&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;'X'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;run&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;GreetZ,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Herman&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 16:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERL-expression/m-p/165564#M31947</guid>
      <dc:creator>Jaheuk</dc:creator>
      <dc:date>2014-02-06T16:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: PERL expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERL-expression/m-p/165565#M31948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data a; &lt;/P&gt;&lt;P&gt;&amp;nbsp; length c023 $11. ; &lt;/P&gt;&lt;P&gt;&amp;nbsp; c023='400BE88XX'; &lt;/P&gt;&lt;P&gt;&amp;nbsp; ba=substr(c023,6,-6+index(c023,'X'));&lt;/P&gt;&lt;P&gt;&amp;nbsp; ba_prx=prxchange('s/(.*BE)(.*)(XX.*)/$2/o',-1,c023);&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Feb 2014 17:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERL-expression/m-p/165565#M31948</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-02-06T17:20:45Z</dc:date>
    </item>
  </channel>
</rss>

