YAFZ has asked for the wisdom of the Perl Monks concerning the following question:
And I want two things.bit.txt ===================== 110101010110111010101 100000000000000000001 101010101010101010101 110000000000000000011 110100000000000000000 11
My question is: Are these the shortest possible RegExps for the job? Especially the second one? Can it be shorter?1) ^(0*10*10*)*$ 2) ^(0*10*10*)*1(0*10*10*)*$
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Number of bits, length of RegExp
by pfaut (Priest) on Apr 21, 2003 at 14:36 UTC | |
|
Re: Number of bits, length of RegExp
by Improv (Pilgrim) on Apr 21, 2003 at 14:36 UTC | |
by diotalevi (Canon) on Apr 21, 2003 at 14:58 UTC | |
by Improv (Pilgrim) on Apr 21, 2003 at 15:02 UTC | |
|
Re: Number of bits, length of RegExp (not a regex)
by Aristotle (Chancellor) on Apr 21, 2003 at 17:18 UTC | |
|
Re: Number of bits, length of RegExp
by Thelonius (Priest) on Apr 21, 2003 at 14:51 UTC | |
|
Re: Number of bits, length of RegExp
by demerphq (Chancellor) on Apr 21, 2003 at 16:22 UTC | |
|
Re: Number of bits, length of RegExp
by YAFZ (Pilgrim) on Apr 21, 2003 at 18:33 UTC |