The problem is that I want to replace different classes within the clone, where each class has a different name, but a similar pattern. Specifically, the children of the clone have class names such as "text-1", "image-1", "container-1". My intention is to change all of those class names to "text-2", "image-2", "container-2", accordingly. I was planning on using the replaceAll() method since I can use the "-1" as the string to search for to replace.
Any help would be greatly appreciated.