Try to improve regex for packages.