An ontology-based information extraction algorithm for energy codes is proposed. The algorithm aims to support fully-automated energy compliance checking. Techniques and methods are proposed to deal with text complexities in energy codes. The algorithm was tested and evaluated, and achieved promising performance.