Update: With anchors, it will match binary numbers divisible by 3. though I haven't figured out exactly why.
Update: Here's a couple hints though. Left shifting a number divisible by 3 yields another number that is divisible by three. Adding two such numbers (obviously) still preserves this property. The innermost part of the regex is still a stumper though...
What kind of bits match /^(01*0)*$/, and why can you shove them between two '1's and get a number divisible by 3???
-Blake
In reply to Re: Regex refresher
by blakem
in thread Regex refresher
by FoxtrotUniform
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |