<?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 regex contraint for replication. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393038#M94628</link>
    <description>&lt;DIV class="post-text"&gt;&lt;P&gt;Could anyone please tell me how to write perl regex which contains prefix or not + 9 number string which can contain only 5 reps of single number. I can not find constraint for replication.&lt;/P&gt;&lt;P&gt;I use perl regular expression in sas&lt;/P&gt;&lt;PRE class="lang-perl prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;data regexp&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; _n_&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; then pattern&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;prxparse&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"~^(48|0|48|0048|)+[1-9]{1}+[0-9]{8}~o"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;    retain pattern&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;    set new&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; prxmatch&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;pattern&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;nr_tel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; then flg&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; else flg&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;run&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 04 Sep 2017 19:30:04 GMT</pubDate>
    <dc:creator>Matt3</dc:creator>
    <dc:date>2017-09-04T19:30:04Z</dc:date>
    <item>
      <title>Perl regex contraint for replication.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393038#M94628</link>
      <description>&lt;DIV class="post-text"&gt;&lt;P&gt;Could anyone please tell me how to write perl regex which contains prefix or not + 9 number string which can contain only 5 reps of single number. I can not find constraint for replication.&lt;/P&gt;&lt;P&gt;I use perl regular expression in sas&lt;/P&gt;&lt;PRE class="lang-perl prettyprint prettyprinted"&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;data regexp&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; _n_&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; then pattern&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;prxparse&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str"&gt;"~^(48|0|48|0048|)+[1-9]{1}+[0-9]{8}~o"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;    retain pattern&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;    set new&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;
    &lt;SPAN class="kwd"&gt;if&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; prxmatch&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;pattern&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;nr_tel&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; then flg&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;1&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; else flg&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;run&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Sep 2017 19:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393038#M94628</guid>
      <dc:creator>Matt3</dc:creator>
      <dc:date>2017-09-04T19:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Perl regex contraint for replication.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393046#M94632</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/127617"&gt;@Matt3&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Eventually don't try to pack everything into a single RegEx.&lt;/P&gt;
&lt;P&gt;Below a RegEx which will&amp;nbsp;find a match for&amp;nbsp;any string with at least 5 repeated digits.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  infile datalines truncover;
  input string $20.;
  retain prxid;
  if _n_=1 then
    prxid=prxparse('/(\d)\1{4}/');
  check=prxmatch(prxid,string);
  datalines;
1233455556789
1222333334556
1235555555556
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 21:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393046#M94632</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-09-04T21:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Perl regex contraint for replication.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393054#M94636</link>
      <description>&lt;P&gt;Please provide a good sample of match and non-match strings. Try to cover most possibilities.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 22:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393054#M94636</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-09-04T22:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Perl regex contraint for replication.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393101#M94654</link>
      <description>&lt;P&gt;Always check here before doing common regex (IMO):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.regexlib.com/?AspxAutoDetectCookieSupport=1" target="_blank"&gt;http://www.regexlib.com/?AspxAutoDetectCookieSupport=1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Sep 2017 06:44:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393101#M94654</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-09-05T06:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Perl regex contraint for replication.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393456#M94751</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can catch replication by using the lookahead / lookbehind assertions.&lt;/P&gt;&lt;P&gt;We need a bunch of good samples / results to start having fun by helping you.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 08:35:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-regex-contraint-for-replication/m-p/393456#M94751</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2017-09-06T08:35:03Z</dc:date>
    </item>
  </channel>
</rss>

