"Filter text on regex."
I want to find all text snippets containing 1 or several words via regex. if I write select Filter Examples, and set it to "Expression" and provide it with: finds(Text, "(?i)\blootbox|micro\b") it doesn't work, although it is syntactically correct.
If I remove |micro, it only returns all snippts that contain lootbox - why does it not return an example with one of them? If I use RapidMiner's regex checker on some dummy data it works with the match on both of them, just not with "Filter Examples".
Kindly help!
Tagged:
0
Answers
Well, this expression actually IS an exact match ;-)
So I assume you would like to only match if there is a non-word character before and after? Is that what you mean? In this case, the correct expression is finds([Text],".*\\W+lootbox\\W+.*|.*\\W+micro\\W+.*") - process below.
Please note however that in this case you would also no longer find plurals easily, so for example "lootboxes" would not trigger this any longer.
Cheers,
Ingo
<?xml version = " 1.0 " encoding = " utf - 8 " ?> <过程版本sion="9.2.000">