Can someone please explain to me how to use wildcards correctly?
My end goal is to create a script that replaces any material asset that ends with (number) with the same asset without that suffix.
Assuming that only the names with a number have parenthesis, you can use string contains and search for " ( " or " ) " and filter the list that way.
Or you can use what you got and change the code block to " ) ".
Unfortunately there are some appearance assets with parenthesis in the name, so that approach to filtering isn’t great here. Am I wrong to think the * should be the way to represent a wildcard?
With the Clockwork package
(for codes)
edit: I made a syntax error about the incoming Regex"
cordially
christian.stan
Similar method as what @christian.stan suggests. Instead of using asterisk, create your search list and use Strings.SearchListForStringContains from Lunchbox.
Great thanks, is there something similar I can do for duplicates beyond 9? For example I have an example project with Generic (60) asset name.
I don’t mind having multiple passes to filter the list down.
Just change the 9 to 60 or whatever number you want to set the max range to. I just used 9 for the example. If you will never have any with (0) in the name, then start the range at 1. Change to [1…60] in the code block.
That simple! Thanks.