(Bluefox) get states by pattern