use regex to extract name and version from pip output