Use substr to remove prefix and postfix when getting section id.

Fixes #140.