Suppose I have the string: BLAH BLAH BLAH copy 2
.
I want to find the index of the two pieces, the word 'copy' and a number that may follow the word copy.
I have the regex: /(copy)\s+([0-9]+)$/i
which successfully matches copy and 2 from the above string. How can I find the index of the number 2? I know I can use .index to find the position of the matched test 'copy 2', but I would like to get the position of '2' so that I can increment it.