Row Filter - RegEx

regex didn’t work, although it worked in regex extract and in https://regex101.com/
Any tips?

Hello @deicide_bg,

can you explain what patterns you would like to include?

Br,
Ivan

Your regex searches for “to”
is that what you are looking for?

“total” and “loans” - both have second letter “o”

Hi @deicide_bg

^.*[o]\w+
Will work for you.
BTW you can use ^\S+ to extract first word of sentence.

GL
Mehrdad

Hi @deicide_bg,

Your regex and node configuration will include strings like (the letter “T” can be any character):

T
To
Too
Tooo
Toooo... 
o
oo
ooo
oooo...

So if you need something else, please provide us with more explanation.

:blush:

1 Like

No, I checked it online in the link, and it worked. But in KNIME it didn’t return any row.

Hello @deicide_bg,

Not sure what have you checked but you regex is not full match and thus you get empty table.

regexTest

You need dot before Asterisk (^.o.*) if you want to include rows where in first word second letter is o.

Br,
Ivan

4 Likes

hm, I checked again - you’re right.
I must have mistaken the marked part (LO… / TO…) for a sufficient match.
I still don’t get the logic (of the entire regex tbh), but this works. Thanks!

1 Like

Hello @deicide_bg,

you have explanation on on the right side on link you shared in first post :wink:

Br,
Ivan

1 Like

I didn’t interpret it in such a way. But thanks anyway. :slight_smile:

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