How to get the last part of a path?

Answered

Comments

1 comment

  • Avatar
    jesus

    Hi Bastiaan,

    You can use the setInstallerVariableFromRegEx action to get the last part of a given path. Find below an example of how to achieve that:

      <setInstallerVariableFromRegEx>
        <name>last_part</name>
        <pattern>^.*(\\|/)(.*)$</pattern>
        <substitution>\2</substitution>
        <text>${path}</text>
      </setInstallerVariableFromRegEx>
    
    0
    Comment actions Permalink

Please sign in to leave a comment.