What wildcards exist in KNIME?

Hello everyone!

I have the following problem: I want to filter my data for data that starts with a number, for example: inlcude 123.8zut, exclude zut.123.

I thought this should be easily mangable using wildcards. According to a forum post, the wildcards in Knime are handled the same as anywhere else (Wildcard explanation).

Thus, I thought that using a row filter with matching wildcard and the expression “#*” should give me every value starting with a number, however, it returns an empty table. Am I missing something here?

Thanks alot!

Hi @KasimirNepomuk unfortunately the link to that topic that you posted leads to some slightly misleading information (it refers to a microsoft-specific page on wildcards, rather than KNIME usage)

Wildcards in KNIME are only * for any number of any characters, and ? for any single character

Regular expressions give you more fine-tuned control, and if you want to match to any string beginning with a number, you could use something like this:

^[0-9].*

^ = start of string
[0-9] = any single character in the range 0-9 (i.e. a digit)
.* = 0,1 or more characters

The exact syntax used can vary slightly when using scripting nodes, especially if your regular expression contains the \ character, which is why, for simplicity I prefer to use [0-9] for my digits instead of the synonymous \d that others may prefer/suggest :wink:

3 Likes

Thank you very much, that cleared things up for me :slightly_smiling_face:

1 Like

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