Select three consecutive digits and call the same function for other blocks
if ( len ( givenString ) < index + 3 or int ( " " . join ( givenString [ index : index + 3 ] ) ) > 255 ) : NEW_LINE INDENT return ; NEW_LINE DEDENT ipAddress += givenString [ index : index + 3 ] + [ ' . ' ] ; NEW_LINE GetAllValidIpAddress ( result , givenString , index + 3 , count + 1 , ipAddress ) ; NEW_LINE