Initial version for 0.7.x series, now use pattern-replace module.