How to use regular expression to include multiple Rows according to RowID in Row Splitter

I have read other similar posts in KNIME forum and tried their method, unfortunately it didn’t work for me. For example if I want to include only rows 2 and 16, I have used

Row[2,16]
Row[2|16]
(Row0#2|Row1#1)d/

and none of them returned the result. Anyone knows how to deal with it?

Hello @tahami,

you can use Rule-based Row Filter and following expression:

$$ROWID$$ MATCHES "Row0#2|Row1#1" => TRUE

This is under assumption that row number 2 and 16 will always have this Row ID value. If not that you can use Row Filter and option to include by Row number.

Br,
Ivan

2 Likes

Hi @tahami

Remove the /d and it will start working :wink:

3 Likes

Thanks, where should I write this code down?

Thanks @ArjenEX , that was the only thing I didn’t try :sweat_smile:

You are welcome. In Rule-based Row Filter node :slight_smile:
Br,
Ivan

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