• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » extracting substrings from a tSystem output using a regular expression

#1 2010-03-24 00:31:25

matthieu_r
Guest

extracting substrings from a tSystem output using a regular expression

Tags: [regex, tsystem]

Hello,

I've got a tSystem which gives me the following output:
Extent 134 9786.676,654 07097.98
The current pattern is the following one:
Extent xmin ymin xmax ymax

I connect a tJavarow to the tSystem in order to treat the result
I'd like to know how to extract xmin, ymin, xmax and ymax using regular expressions in the tJavaRow.

Thanks!

#2 2010-03-24 07:07:52

shong
Talend team
Registered: 2007-08-29
Posts: 10305
Website

Re: extracting substrings from a tSystem output using a regular expression

Hello
Output the result of tSystem to a global var, and then get the output result and extract the substring on tJava.

Best regards
Shong


Uploaded Images


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2010-03-24 09:35:46

mathieu_r
Member
Registered: 2009-04-12
Posts: 73

Re: extracting substrings from a tSystem output using a regular expression

hello shong

I thank you for the imaged answer!
Sorry for not having being clear enough..

the output is only:
Extent 134 9786.676,654 07097.98

But the pattern is the following one:
Extent xmin ymin,xmax ymax
The schema of my tJavaRow will be with 4 columns
xmin
ymin
xmax
ymax

So I'd like to know how to extract the first float number, the second one and so forth, using a regular expression.

Thanks again! smile

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » extracting substrings from a tSystem output using a regular expression

Board footer

Powered by FluxBB