Column Splitter Node With Multiple Wildcard Criteria

I have several groups of columns, each with hundreds of columns in each group, with the names ending in particular descriptions ("(Count*)", “(Count*)_Percentage”, and “Binary”).

Setting the Column Splitter Wildcard to any of the three (ie: (Count)) easily returns the full column series.

But can I set up all three of the naming criteria all at once in the same Wildcard input? I can’t get this to work and find no discussions on it.

Thanks

Hi @smithcreed , you can use OR to specify multiple rules

Hi @smithcreed

This is possible to do using the “Regular expression” option. One just needs to write separately the regular expressions required for each one of your desired group of columns and then put them together using a vertical bar | (“or” operation for regex).

For instance, let say we want to filter in the following columns defined as:

something followed by (Count*)
something followed by (First*)
something followed by (Average*)

where * is part of the column name. A simple way of writing the three regex would be:

.*\(Count\*\)
.*\(First\*\)
.*\(Average\*\)

* and ) need to be preceded by a \ because they are exreg metacharacters which have a meaning in regular expressions.

Then one just needs to put the three regex together separated by a vertical bar | to say “either” select this “or” that:

.*\(Count\*\)|.*\(First\*\)|.*\(Average\*\)

I have simulated an example here below for .*\(First\*\)|.*\(Last\*\) :

Hope this helps.

Best

Ael

1 Like

Thank You! Your solution worked perfectly :grin:

Thank You! All worked perfectly.

Hi @bruno29a

I didn’t know of this possibility. How do you insert an OR in a wildcard solution ?

Thanks :smile:

Ael

I went with your solution because you were kind enough to show me enough detail to correctly set my own data up. Again, thanks

1 Like

Hi @aworker , with Regex, not with Wildcard, sorry I should have specified/added this.

2 Likes

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