Mauricio Goette
Mauricio Goette

Reputation: 19

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

Upvotes: 0

Views: 1277

Answers (1)

nsousa
nsousa

Reputation: 4544

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.

Upvotes: 2

Related Questions