Qwop Pattern

Qwop Pattern - I would like to use pivot_longer() from {tidyr} with names_pattern to convert my data to long format while keeping the prefix string from one of the pattern matches in the column names.