/^[01]$|^([01])[01]*?\1$/ [download]
In reply to Re^2: Fun Regex Exercise by Anonymous Monk in thread Fun Regex Exercise by japhy