regex to match the root state