try to support mixed regexp rules.
finish session tools