Yeah, its not unreasonable that you’d have a remote way to access the device to gather debug data with the customers consent. An SSH key in the firmware is a flexible way to do that, so long as there are good controls in place to ensure that it isn’t misused.
#\s+
is:#
: a literal#
\s
: any whitespace character (space, tab etc)+
: the previous thing (here the whitespace), one or more timesIn words: “a hash followed by at least one whitespace character”
#[^\s].
is:#
: a literal#
[^\s]
: a negated character class. This matches anything other than the set of characters after the^
.\s
has the same meaning as before, any whitespace character.
: matches any single characterIn words: “a hash followed by any character other than a whitespace character, then any character”.
https://regex101.com/ is really good for explaining regex