Rule-based row filter - Remove non numbers

Hello,

I am new to KNIME and I am sorry if this questions has been posted before, or if it is too simple…
I am trying to remove the rows which don’t contain a number in one of my columns (2nd). I guess I could do this with the Rule-based Row Filter, but I am stuck at figuring out what expression to use…

Thank you very much in advance for your help!

Hi @CK24_SH

Can you give more context?

What is the column type of this column?
Are the cells you want to evaluate empty? If not, what do they contain?

1 Like

Hi @elsamuel

This is how my data looks like. I want to delete the rows that don’t contain numbers in Column B. It is a normal text string…

Please let me know if you need some more screenshots or anything else.

Thank you

.

Hi CK24_SH, as usual there are several ways to do it. They I would, would be by adding a “Rule-based Row Filter” with a rule combining a little bit of Regex like:

$Name of the Column$ MATCHES “.([0-9]{8}).” => FALSE

This way, as far as I can see numbers set have a character of 8. Hope this helps.

Regards,

4 Likes

Use String to number node and then row filter to filter the missing values (values which could not be converted to number).

2 Likes

In that case you’ll delete the leading zero of the numbers, so I think @JorgeAraya20CR solution would fit better.

1 Like

True. if that is an issue, copy the column before hand and perform string to number and filtering in the copy.

2 Likes