<?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: how to find repeated pattern in phone number in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/443030#M282791</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12983"&gt;@gyambqt&lt;/a&gt; wrote:&lt;BR /&gt;Hi Patrick, I thought there might be some mathematic tricks like 12121212 is divisible by 10101 that able to solve the issue.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;May be. But especially because this is about the very common case of phone number validation I'd go for RegEx. There should be a lot of RegEx published on the Internet and you won't have to "invent" everything from scratch. Just search a bit&amp;nbsp;and use the one closest to your needs as a starting point.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Mar 2018 20:22:01 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2018-03-06T20:22:01Z</dc:date>
    <item>
      <title>how to find repeated pattern in phone number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442766#M282785</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a list of phone number that including both Australia and oversea. the length of the phone number is undefined (can be anything)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to know if there is a smart way to find repeated pattern within any phone number without using regular expression.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example:&amp;nbsp; &amp;nbsp;04123123123 has repeated pattern 123123123&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or 1212121212&lt;/P&gt;
&lt;P&gt;has repeated pattern 1212121212&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 07:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442766#M282785</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2018-03-06T07:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to find repeated pattern in phone number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442797#M282786</link>
      <description>&lt;P&gt;And why don't you want to use RegEx as that's the "ideal" syntax for anything pattern?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 08:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442797#M282786</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-03-06T08:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to find repeated pattern in phone number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442798#M282787</link>
      <description>&lt;P&gt;Do the repetitions have to be consecutive, or could this be a repeating pattern:&amp;nbsp; 1234123&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could a repeating pattern contain as few as four digits (the original two, plus one repetition)?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 08:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442798#M282787</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-03-06T08:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to find repeated pattern in phone number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442826#M282788</link>
      <description>Yes it can has repeats like that . But I want to remove the one that obviously invalid phone number.</description>
      <pubDate>Tue, 06 Mar 2018 10:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442826#M282788</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2018-03-06T10:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to find repeated pattern in phone number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442827#M282789</link>
      <description>Hi Patrick, I thought there might be some mathematic tricks like 12121212 is divisible by 10101 that able to solve the issue.</description>
      <pubDate>Tue, 06 Mar 2018 10:51:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442827#M282789</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2018-03-06T10:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to find repeated pattern in phone number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442914#M282790</link>
      <description>&lt;P&gt;Well, it's not really clear what "obvious" means in this context.&amp;nbsp; So here's an example of how to do this for three-digit sets of digits:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;length repeated3 $ 3;&lt;/P&gt;
&lt;P&gt;if length(phoneno) &amp;gt;= 6 then do k=1 to length(phoneno)-5;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; repeated3 = substr(phoneno, k);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if index( substr(phoneno, k+3), repeated3) then output;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/442914#M282790</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-03-06T14:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to find repeated pattern in phone number</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/443030#M282791</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12983"&gt;@gyambqt&lt;/a&gt; wrote:&lt;BR /&gt;Hi Patrick, I thought there might be some mathematic tricks like 12121212 is divisible by 10101 that able to solve the issue.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;May be. But especially because this is about the very common case of phone number validation I'd go for RegEx. There should be a lot of RegEx published on the Internet and you won't have to "invent" everything from scratch. Just search a bit&amp;nbsp;and use the one closest to your needs as a starting point.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Mar 2018 20:22:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-find-repeated-pattern-in-phone-number/m-p/443030#M282791</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-03-06T20:22:01Z</dc:date>
    </item>
  </channel>
</rss>

