-
Using Regex in AE
Heiho,
I’m just trying to get a glimpse of RegEx in working with AE. But I can bring my idea to run in the tool. Perhaps, you can help me:
I would like to find out the Version in different files (project-names or rendered files). So I can’t just use a split-method, esp. when our renderings also have a version-folder.
Our naming would be s.th. like:
Project-File:
xxx_xxx_mograph.v001.aep
Renderings:
\xxx_xxx\output\v001\jpg\xxx_xxx_mograph_output.v001.[####].jpgmy script looks like this (right now, I want to replace the version with a hardcoded “vxxx” – just to see if it works):
var fileName = app.project.file;
var p = ("(v+[0-9])");
var versMatch = p.match(fileName);
while (versMatch.find())
fileName.replace(versMatch.group(1), "vxxx")
alert ("New Filename:\n"fileName)What am I missing?