Use regex to validate packageName