Added calculate spec.
Added more spec for correcting regexp rule.