The inputs are string and the output is another string.
I have two steps which uses different software, each of the software requires different convention for glob’bing files
I was hoping to use the first string with the $F4 and regex it to %04d, basically doing a
$F[1-9] -> %0[1-9]d
Hence I was wondering if there are any javascript/other-language-construct I can use for regex.
Otherwise, I am planning to add another step in the workflow just for doing the regex via Python or Go but that seems like heavy lifting for such a trivial task.
Oh, I think I understand now. You have a filename pattern, both pieces of software need to take that filename pattern, but the exact pattern formats are different.
Yes, you can certainly use a Javascript regex. Try something like this:
Since I have a dependent step, I will generate the output sequence name in that step and use it in the ffmpeg step i.e. I do the regex in the previous step. So my render steps will output the sequence string with the %04d variation
My complete workflow for all the steps are now working.