Check if there is any other character other than '0' or '1' . If so then set oneSeen to 0 to search again for new pattern
if ( $ str [ $ i ] != '0' && $ str [ $ i ] != '1' ) $ oneSeen = 0 ; } return $ count ; }