Change: Backport smartos pkgin regex fix

Ref: https://dev.cfengine.com/issues/6353