added regex and error warning for wrong ip/subnet