• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tExtractRegexFields not splitting as expected

#1 2012-07-05 18:00:29

elcalvomike
Member
Registered: 1970-01-01
Posts: 37

tExtractRegexFields not splitting as expected

Tags: [regex]

I have an iterate job that passes the subject of an email that has two numbers in it that I need to split out.
Example "Design #: 1402579, MT. TABOR SPARTANS - 3582142 Designer: CIS"

I am trying to use the tExtractRegexFields and it is working for the first part of the split but not the second.
The regex I am using is "([0-9]*),([0-9]*)"

So split the string at the comma, and give me only the two number values. Any hints here?
log
.-------------------------------------------------------------+------------+-------------.
|                                       tLogRow_1                                        |
|=------------------------------------------------------------+------------+------------=|
|Subject                                                      |field1|field2|
|=------------------------------------------------------------+------------+------------=|
|Design #: 1402579, MT. TABOR SPARTANS - 3582142 Designer: CIS|1402579     |             |

Last edited by elcalvomike (2012-07-05 18:00:53)

Offline

#2 2012-07-06 05:31:33

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: tExtractRegexFields not splitting as expected

Hi

Please try this regex.
"([0-9]*),(.*)- ([0-9]*)"
Then use tFilterColumn to get these two number columns.

Regards,
Pedro


Only Paranoid Survive.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » tExtractRegexFields not splitting as expected

Board footer

Powered by FluxBB