use ast rather than re to get version