How to extract a subset from a CSV file using NiFi

為{幸葍}努か 提交于 2019-12-02 09:02:33

As I said in the comment, you can Count the number of commas before the text, you want to match and use that in the RegEx, like this:

/(?<=^([^,]+?,){5})[^,]+/

What the RegEx do is, it starts from left of string and Counts the number of commas, before it matches text between 2 commas.

The number in the curly braces defines what column to match (how many commas to skip).

You run the RegEx once for every column, you want, specifying the column number.

See my answer to this SO question to your related question about selecting CSV columns.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!