this was just a simple index problem. The 0. entry of a regex result is the whole string and not the first capture group
added e2e tests to fix this in the future
cypress does currently not support copy to clipboard in firefox so this part of the test is commented out (for the time being)