You can do this with selectfilter in combination with match.
groups.rds | select("match", ".*production.*") | first
. , , () . , ?
- :
[non_rds]
some.unrelated.development.host
[rds]
some.production.host
some.staging.host
some.development.host
[production]
some.production.host
[staging]
some.staging.host
[development]
some.development.host
some.unrelated.development.host
:
groups.rds | intersect(groups.development) | first
, rds development, some.development.host.