stringkettlepentaho-spoonpentaho-data-integrationpdi

Delete last two character of a string - Pentaho Data Integration


This is probably a stupid question but I can't figure out for the life of me which step would allow the last two character of a string to be deleted in Pentaho Data Integration V9.2


Solution

  • There are many ways to do that, perhaps the simplest is a Replace in strings step, using a Regex (e.g., search for (.*).{2} and replace by $1).

    This will replace the entire string by the first capture group, which is made up of the entire string except the last two characters.