Trim Characters Functionality

Comments

3 comments

  • Avatar
    michiel

    You could use <setInstallerVariableFromRegex> to trim the first four characters:

     <setInstallerVariableFromRegEx>
    <name>trimmed</name>
    <text>1234-56789</text>
    <pattern>"^(....).*</pattern>
    <substitution\1<substitution/>
    </setInstallerVariableFromRegEx>

     

  • Avatar
    Jake

    Thanks, I was able to get it using something like this this: 

    <setInstallerVariableFromRegEx>
        <name>value1</name>
        <pattern>^(.*?)-(.*?)$</pattern>
        <substitution>\1</substitution>
        <text>${value}</text>
      </setInstallerVariableFromRegEx>
  • Avatar
    BitRock support

    It's great to hear you found a solution.

Please sign in to leave a comment.