Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Square Box CatDV Regex in catdv worker 9

  • Regex in catdv worker 9

    Posted by Baptiste Noirau on December 12, 2022 at 1:11 pm

    Hello everyone,

    I use regex to extract some data from file names.

    But this time I have to do it on a folder name.

    Example:

    I have a tree of type :

    Folder/22_Test_SubFolder/File.mov

    In this case I must recover the value 22 or Test in the name of the folder but it is not fixed values.

    Do you have an idea ?

     

    Regards,

    Josh Waller replied 1 year, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Josh Waller

    June 6, 2023 at 3:24 pm

    I believe this will do it for you:

    Folder/22_Test_SubFolder/File.mov

    $i[2]{s,([\w]{2})_(.*),$1} should grab the ’22’

    $i[2]{s,([\w]{5})_(.*),$2} should grab the ‘Test’

    $i[2]{s,([\w]{5})_(.*),$3} should grab the ‘SubFolder’

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy