Don’t laugh, but I’ve literally spent 2+ hours trying to figure this out so I’m giving up and asking for help.
My prediction columns are labeled “P (Target=Buy) (#1)” and then “P (Target=Buy) (#2)” , etc (they don’t actually have the quotes). What is the regex pattern to filter by “#1” , #2, #3 etc…?
I’m not totally sure about requirement.
If I assume that you would to filter for “P (Target=Buy) (#1)” and get this column as result.
So you may use the Column Filter Node.
According to my knowledge using something like
.*(#1)
as the regex to select the column should work.
Please do not forget to check regex selection below the regex itself.
When applying to the column filter node this works perfectly for me.
I should have had a look to the regex before posting. This regex will obviously not bring the correct result, the brackets will return just a part of the input string
Apologise for this stupid Copy&Paste error.
The correct regex is
.#1.
Unfortunately I’m not able to correkt my first post.
If you really what to use regex to get column which have “#d+” (be careful as you might have columns with that pattern which are not prediction columns) use following regex:
I should have clarified my original post in that I need to filter in a loop. i.e. Loop 1 I’m looking for columns with “1” in the name, etc. I tweaked Ivan’s answer to do this, so for loop 1 the regex is:
.*#1+)