get active state from url with regexp pattern