what3words: moved query regex validation to method and added unit tests