I’m writing a complicated script to export multiple JPEGs from a given Photoshop file that has multiple “color” layers. The layer structure for my Photoshop files is something like this:
-“(Product 1)” - This is a group of layers representing a product - needs to stay visible for the exported JPEG
-“(Product 2)” - Another group that needs to stay invisible for the first round of saving out the images. Will be made visible for round two.
-“COLOR: White - S01”
-“COLOR: Red - S12”
-“COLOR: Black - S04”
-“(Other)” - One or more layers that need to stay visible for the exported JPEG
-“Background”
As part of my script, I need to be able to pull the “S” number from each color layer and use it as part of the resulting JPEG file name. How can I pull just part of each of those layer names? The resulting files would be named something like this: “PRODUCT_S12.jpg”
Thanks in advance!