<?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 Regular Expression Modifier in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280874#M56842</link>
    <description>&lt;P&gt;I have searched and not found the answer, hoping someone here can assist. The error message below is displayed in the SAS Log when I attempt to use the "/g" modifier in a prxparse statement.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000" face="terminal,monaco"&gt;ERROR: Regular expression option "g" in "/ABC-\d{4}-\d{4}/g" is not supported.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000" face="terminal,monaco"&gt;ERROR: The regular expression passed to the function PRXPARSE contains a syntax error.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears that "/g" is a valid PERL modifier however SAS does not support this modifier, so I need a solution that will allow me to find the patter above in a string and return all instances matched from the string, an example of the string is below.&lt;/P&gt;
&lt;P&gt;"Technology Affected:&amp;nbsp;program name here&amp;nbsp;ABC ID: ABC-5102-2408 Record #:1596081 First publish date: 6/1/1969" or alternately&lt;/P&gt;
&lt;P&gt;"Technology Affected:&amp;nbsp;program name here&amp;nbsp;ABC ID: ABC-5102-2408&amp;nbsp;ABC-9876-1234 ABC-7654-3456 ABC-0192-3948&amp;nbsp;Record #:1596081 First publish date: 6/1/1969"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2016 18:45:22 GMT</pubDate>
    <dc:creator>GriffT</dc:creator>
    <dc:date>2016-06-28T18:45:22Z</dc:date>
    <item>
      <title>PERL Regular Expression Modifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280874#M56842</link>
      <description>&lt;P&gt;I have searched and not found the answer, hoping someone here can assist. The error message below is displayed in the SAS Log when I attempt to use the "/g" modifier in a prxparse statement.&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000" face="terminal,monaco"&gt;ERROR: Regular expression option "g" in "/ABC-\d{4}-\d{4}/g" is not supported.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000" face="terminal,monaco"&gt;ERROR: The regular expression passed to the function PRXPARSE contains a syntax error.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It appears that "/g" is a valid PERL modifier however SAS does not support this modifier, so I need a solution that will allow me to find the patter above in a string and return all instances matched from the string, an example of the string is below.&lt;/P&gt;
&lt;P&gt;"Technology Affected:&amp;nbsp;program name here&amp;nbsp;ABC ID: ABC-5102-2408 Record #:1596081 First publish date: 6/1/1969" or alternately&lt;/P&gt;
&lt;P&gt;"Technology Affected:&amp;nbsp;program name here&amp;nbsp;ABC ID: ABC-5102-2408&amp;nbsp;ABC-9876-1234 ABC-7654-3456 ABC-0192-3948&amp;nbsp;Record #:1596081 First publish date: 6/1/1969"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 18:45:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280874#M56842</guid>
      <dc:creator>GriffT</dc:creator>
      <dc:date>2016-06-28T18:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: PERL Regular Expression Modifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280887#M56846</link>
      <description>&lt;P&gt;What is modifier &lt;EM&gt;g&lt;/EM&gt; supposed to &amp;nbsp;mean?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 19:39:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280887#M56846</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-28T19:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: PERL Regular Expression Modifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280890#M56848</link>
      <description>&lt;P&gt;According to the help text on &lt;A href="https://regex101.com/" target="_blank"&gt;https://regex101.com/&lt;/A&gt; the definition is:&lt;/P&gt;
&lt;P&gt;"&lt;SPAN class="modifier"&gt;g modifier:&lt;/SPAN&gt; &lt;STRONG&gt;g&lt;/STRONG&gt;lobal. All matches (don't return on first match)".&lt;/P&gt;
&lt;P&gt;When i test my PERL expression on this site using the "g" modifier I get matches for all instances in the text example.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 19:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280890#M56848</guid>
      <dc:creator>GriffT</dc:creator>
      <dc:date>2016-06-28T19:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: PERL Regular Expression Modifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280904#M56852</link>
      <description>&lt;P&gt;Look at CALL PRXNEXT() to retrieve multiple matches.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 20:22:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280904#M56852</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-06-28T20:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: PERL Regular Expression Modifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280930#M56860</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS does not suport all perl modifiers. The only suffixes supported by sas are i x&amp;nbsp;s m and o.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The documentation is wrong about what is supported though. For example \G is a supported assertion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A full list of supported syntax together with examples is shown in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.amazon.com/High-Performance-SAS-Coding-Christian-Graffeuille/dp/1512397490" target="_blank"&gt;https://www.amazon.com/High-Performance-SAS-Coding-Christian-Graffeuille/dp/1512397490&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2016 21:56:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280930#M56860</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2016-06-28T21:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: PERL Regular Expression Modifier</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280962#M56882</link>
      <description>&lt;P&gt;And there is a little error in your PRX .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
str="Technology Affected: program name here ABC ID: ABC-5102-2408 ABC-9876-1234 ABC-7654-3456 ABC-0192-3948 Record #:1596081 First publish date: 6/1/1969";
pid=prxparse('/ABC\-\d{4}\-\d{4}/o');
start=1;
stop=length(str);
call prxnext(pid,start,stop,str,p,l);
do while(p&amp;gt;0);
 temp=substr(str,p,l);
 call prxnext(pid,start,stop,str,p,l);
 put temp=;
end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jun 2016 01:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PERL-Regular-Expression-Modifier/m-p/280962#M56882</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-06-29T01:55:08Z</dc:date>
    </item>
  </channel>
</rss>

