Reuse Patterns Using Capture Groups2

someone else posted about this and their solution is here: