Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Retrieve a part of a property name

  • Retrieve a part of a property name

    Posted by Martin Jean-sébastien on July 22, 2015 at 4:10 pm

    Hello,
    I would like to split a property name to obtain only the number in the name.
    In the code below, maPropGroup is egual to “Outro01”. I want to split this text just to obtain the “01”. But here my result is “,01″….. I don’t understand!!

    Here is my code :
    var maProp = thisComp.layer(“test”).text.animator(“Outro01”).selector(“Sélecteur d’expressions 1”);
    var reg_exp = /Outro/;
    var maPropGroup = maProp.propertyGroup(1).propertyGroup(1).name;
    var monChiffre = maPropGroup.split(“Outro”);
    monChiffre;

    Thank you in advance for your help!

    Martin Jean-sébastien replied 11 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    July 22, 2015 at 4:38 pm

    Try changing the last line to:

    monChiffre[1];

    Dan

  • Martin Jean-sébastien

    July 23, 2015 at 1:07 pm

    Yes, thank you Dan, I didnt know that it was an array! Thanks!

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