Dirk Sachse
Dirk Sachse

Reputation: 67

Pentaho Data Integration - Extract string from string

I have this string:

Goods: 1 pallet 120x80x100 100KG

This is the regex I would use in Ruby:

^Goods: <i>(.*)<br>$

This is what I need as the result:

1 pallet 120x80x100 100KG

How do I do it in Pentaho Data Integration?

Upvotes: 0

Views: 5801

Answers (3)

AlainD
AlainD

Reputation: 6356

You can also use the Regex Evaluation step, but this one relies on Java regex which are a bit different than Ruby's. However, in your case, it is the same :

^Goods: <i>(.*)<br>$

1]

Upvotes: 1

AlainD
AlainD

Reputation: 6356

You can use the same regex in a [Modified] Java Script [Value] step:

^Goods: <i>(.*)<br>$

enter image description here

Upvotes: 0

Cristian Curti
Cristian Curti

Reputation: 1054

There is a step called 'Split Fields', you will feed the column with this data, and set : as delimeter, in the New Fields area you will declare 2 new columns that will receive the split data. This step works pretty much like a Split String per token.

enter image description here

Upvotes: 1

Related Questions