Added code for validate_ip and validate_regex also added tests (validate_regex isn't passing yet).