regexp matching for IP address test
parse flag for master IP