G'MIC exercises

@David_Tschumperle

Thanks for the full example. I sort of had it but mostly didn’t. The thing about indexing is that there are multiple ways to reference an image including, for my example, . , [-1] , or [0--1] . I will stick with the image name for now. This is what I have.

foo_pass0_:
  v - pass$1 1 s_name={`"s = ['"{b}"']; s[find(s,'_c1')] = 0; s[find(s,'2')] = 49; s[find(s,'3')] = 50; s[find(s,'4')] = 51; s"`} rm.
  v + e[^-1] "Process image$? with image '"$s_name"'."

Ideally, I would want to find all _c2, _c3, _c4,… strings and then de-increment the number. At the moment, I am only finding the numbers 2, 3, 4 and replacing them individually, which will leave out _c5,… and replace numbers that could be a legitimate part of the name.