Skip to main content

Hello,

I would like to extract attributes from a text file. The texfile contains different attributes separated by comma (,). It is like:

104.474,104.474,649621.0654572968,245370.49979405673,0,0,146

I tried this regex , but it gives back . delimited values (like: 474,104)

(\\d+)(,\\s*\\d+)*

Thanks!

Have a look at the AttributeSplitter transformer.

After reading the text line by line, this will get you the attribute values in a list.

Then the AttributeManager can convert them to the named attributes you want.

Hope this helps.


1. Try using a CSV Reader instead of TextFile Reader

2. If still needing to use a TextFile Reader, use an AttributeSplitter instead of RegEx


Reply