How to remove rows that has asterisk

Hi Friends

I’m new in Knime, I have a question how to remove the rows that has “*” or asterisk?

Thank you!

Hi @seanmanzanilla,

You can use the Row Filter node, you can configure it with a regular expression, in your case that would be
\*.* which means “asterisk character followed by arbitrary other characters” I recommend https://regex101.com/ as a place to learn more about regular expressions.

best,
Gabriel

2 Likes

I love ASCII “art”. This kind of stuff get’s increasingly rare these day.

If you’re reading that file yourself, you can enter a comment character in the configuration window and the reader node will do the filtering:

2 Likes

HI @Thyme

What node reader you use for this type of settings? My file is .txt so I used the File Reader.

Hi @gab1one

It works for me thank you!

I didn’t include that because I thought all of the text file readers have that. I checked:
filters comments:

  • CSV Reader
  • File Reader – has the same configuration window as the CSV Reader?
  • File Reader (Complex Format) – it’s named single line comment

doesn’t filter comments:

  • Line Reader
  • Fixed Width File Reader
1 Like

Thanks, this could help my future development

1 Like

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