Re: [PHP] PHP script for detecting pattern sequences?

2009-07-10 Thread Isaac Dover
i just got pwned! thanks, andrew. i should've paid more attention to what i was reading. - isaac On Fri, Jul 10, 2009 at 11:19 AM, Andrew Ballard wrote: > On Fri, Jul 10, 2009 at 10:30 AM, Isaac Dover wrote: > >> On Wed, Jul 8, 2009 at 11:32 PM, WenDong Zhang > wrote: > >> On Thu, Jul 9, 2009

Re: [PHP] PHP script for detecting pattern sequences?

2009-07-10 Thread Andrew Ballard
On Fri, Jul 10, 2009 at 10:30 AM, Isaac Dover wrote: >> On Wed, Jul 8, 2009 at 11:32 PM, WenDong Zhang wrote: >> On Thu, Jul 9, 2009 at 6:00 AM, Per Jessen wrote: >> > A suitable regex might look something like this: >> > >> > /([0-9]+)\1+/ >> > >> > Not tested, probably won't work on the first t

Re: [PHP] PHP script for detecting pattern sequences?

2009-07-10 Thread Isaac Dover
sorry, should have added that i'm not aware of any library to do this, but you could certainly write one! :) and i forgot to use the list, sorry. - isaac On Fri, Jul 10, 2009 at 10:28 AM, Isaac Dover wrote: > though this looks suspiciously like a homework assignment, i'll bite. > > those regex

Re: [PHP] PHP script for detecting pattern sequences?

2009-07-08 Thread WenDong Zhang
yes (\d+?)\1+ works fine On Thu, Jul 9, 2009 at 6:00 AM, Per Jessen wrote: > Rob Gould wrote: > > > Can anyone tell me if there's a PHP library out there that will help > > me determine "pattern sequences" from a string? > > > > > > Example input: > > > > 032258064516129032258064516129032258064

Re: [PHP] PHP script for detecting pattern sequences?

2009-07-08 Thread Per Jessen
Rob Gould wrote: > Can anyone tell me if there's a PHP library out there that will help > me determine "pattern sequences" from a string? > > > Example input: > > 032258064516129032258064516129032258064516129032258064516129 > Sequence = 032258064516129 > > > 0370370370370370370370370370370370

[PHP] PHP script for detecting pattern sequences?

2009-07-08 Thread Rob Gould
Can anyone tell me if there's a PHP library out there that will help me determine "pattern sequences" from a string? Example input: 032258064516129032258064516129032258064516129032258064516129 Sequence = 032258064516129 037037037037037037037037037037037037037037037037037037037037 S