Specific regex-question in knime


Im new to knime and I have to ask some very basic questions. I hope this is the right place to do so.


My task is to "translate" a simple STATA-ado in KNIME.

The ado does two things:

- UpperCase of the contents of a specified column

- Look for "^[ABC]+$" in the column and replace it with ""

Additionally, I want to start a timer which starts at the beginning of the meta node* and ends, well, when it ends.

Right now i managed to get the result with a string manipulation-node (uppercase) followed by two row filters that use the pattern ^[ABC]+$, while one includes rows by attribute value and the other excludes them. After the "include"-row filter i put an string manipulation-node that replaces ^[ABC]+$ with "". Then i concatenate-noded the two branches.

My question is if there is a better and more efficient way to do this (I strongly guess so ^^). Moreover, until know I was not able to set a timer.

Another problem occured when I tried to sort by ROWKEY (row-id?!) which resulted in a sort pattern like this: 1,2,3,4,5,6,7,8,9,10,100,1000,10000,10001 instead of 1,2,3,4,5,6,7,8,9,10,11,12...


I hope this is understandable to at least some of you. Many thanks in advance!


*I guess the right expression of an ado in STATA would be a meta node in knime.



For a sortable table, try a java snippet which defines a new int column which contains a line like:

out_index = ROWINDEX;

For the String replacement, have you seen the string replacer node?  It works with regular expressions.  

Finally, the time generator node can be used provide the current execution time so just generate a single row with the current time option enabled. 



Thanks a lot!

Concerning the String replacement-Node: Entering "^A+$" in the "wildcard pattern"-field does not work. I.e. it leaves observation "AA" untouched.

Could it be that only "?" and "*" are legitimate regular expressions in knime?

A post was split to a new topic: Regex in KNIME