No apt command for your needs?
The Python API allows accurate and predictable output, operations.
apt-cache/apt_cache_build_deps.py
Synopsis:
$ ./apt_cache_build_deps.py <package> [more packages...]
Keep track of source package build-deps for later removal.
No grep regex hassle.
apt-mark auto the output to later autoremove.