Lets say I have a list of code like this
foo <- "test" foo <- "test" foo <- "test" foo <- "test" foo <- "test" foo <- "test" foo <- "test" foo <- "test" foo <- "test" foo <- ³test"
Is it possible to automate the insertion of columns of numbers. The output should be this:
foo1 <- "test1" foo2 <- "test2" foo3 <- "test3" foo4 <- "test4" foo5 <- "test5" foo6 <- "test6" foo7 <- "test7" foo8 <- "test8" foo9 <- "test9" foo10 <- ³test10²
Is there perhaps a regex or other automation that could be used? I¹m aware that it is possible to insert line numbers but this will only be useful if the 10 lines of code happen to be on lines 1-10.
Thanks Ross