Improved regex for metadata.