in reply to Fun Regex Exercise

spoiler
Well, in english, it'd have to be a string that if non-empty, began with a 0 or 1, and then either stops there or has zero or 0's or 1's followed by what the string started with. That seems to fit the description.

So as a regex would be:

/^(([01])([01]*\2)?\z/

-- Randal L. Schwartz, Perl hacker