How to extract the package version number from a pyproject.toml file windows commmand prompt type pyproject.toml | sed -nr 's/^version\s*[^=]\s*\"(.+)\"$/\1/p' bash cat pyproject.toml | sed -nr 's/^version\s*[\^=]\s*"(.+)"$/\1/p'