Icon

Context_​Capturing_​with_​Regex

Context Capturing with the Regex Find All Component

Capture the context of a target word. A context is defined as characters before or after the target word.

The regex used is :
.{10}\sin\s.{10}

The regex translated to English:
.{10} – Find 10 characters (spaces are technically characters)
\s – literal space
"in" – target word

The numbers (here 10) indicate the context window size which can be changed by the user.

Adopted library: https://download.java.net/java/early_access/loom/docs/api/java.base/java/util/regex/package-summary.html

Forum question which inspired this workflow: https://forum.knime.com/t/extract-all-instances-of-term-from-string/45735/6

capture context of word in betwxeen the \s.{10}\sin\s.{10}blob of text in one rowfor ease of viewingcollection to columnsRegex Find All Table Creator Table View Split CollectionColumn capture context of word in betwxeen the \s.{10}\sin\s.{10}blob of text in one rowfor ease of viewingcollection to columnsRegex Find All Table Creator Table View Split CollectionColumn

Nodes

Extensions

Links