Improved regexp to match the documentclass.