Regex for Group Node Pattern-Based Aggregation


I need to do use a Group Node to do a lot of math across 695 columns and using the “Manual Aggregation” tab seems ludicrous in KNIME. The other complication is that the columns may change which would mean having to manage all these columns every time there is a change. For this reason, I added a prefix to each of either ZA- or MB- so that I should be able to use the “Pattern-Based Aggregation” tab.

The column names would be something like this:

ZA-EC.Venue Name
MB-WC.Name Site Location

Although the prefix is fairly limited, what appears after the “.” is could be anything including some punctuation “()”.

Regex seems to be the most manageable way forward but my regex knowledge is rudimentary at best. I would really appreciate any suggestions.



Hi @TigerCole,

So, What’s your question exactly?



What would the regex statement look like … None that I have tried work.

Which columns should be selected? All starting with “ZA-” or “MB-”?

Either would be fine … I should be able to adapt as I need.



So ^ZA-.* or ^MB-.* doesn’t work for you? Or ^(ZA|MB)-.* to have both.

1 Like

I get the columns but no sum values, just empty columns.

Which is progress from where I was :smile:


Would you please let me see the input?

Hi @armingrudd … Thanks for the regex help. The regex you sent through is working properly, there was an error on the previous node (a join) so the columns were included but none of the values.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.