devscript: add list_pkg_ids_by_regexp

Inspired by @alebcay in #3431 .
Merge pull request #3441 from rolandwalker/devscript_pkgs_matching_regexp

devscript: add list_pkg_ids_by_regexp