On the stenographic keyboard, there are the keys `STKPWHRAO*EUFRPBLGTSDZ`. The user presses several keys, then the keys are registered all at once when lifted. It's similar to playing chords on a piano. Example strokes are `KAT`, `TPHOEUGT`.

I have a regex which tests for valid steno chords. It can be any number of these keys but they must be in that order. My solution is `qr/S?T?K?P?W?H?R?A?O?\*?E?U?F?R?P?B?L?G?T?S?D?Z?/` but since this regex gets called hundreds of times, the variable length might be a speed bottleneck. Each step forward in the regex is a bigger and bigger set of possibilities due to all the `?`

Is there a faster regex approach to this? I need the regex to fail if keys are out of order.