+1 pattern match.
Note gotcha regarding pattern match: Protip: InsightConnect's Pattern Match (re2) won't match non-breaking space using `\s`
I haven’t tested it but something like this:
{{chatops_command:/(?i)r7-quarantine-endpoint/}}[\s\x{A0}]+{{hostname:/[^\s\x{A0}]*/}}