Multi-Line Range Filter & Replace Component

Here is a component that I put together to help with multi-line string range edits. Thanks to @armingrudd for sharing his Nominal Range Row Filter with me on a recent call which I expanded upon! I find this particularly useful for things like automating re-occurring code editing tasks, flexible report restructuring / formatting, Line Reader text editing, etc. It simplifies multi-line editing and also avoids the hassle of using a ton of escape characters when dealing with code.

Workflow:

Multi-Line Range Filter and Replace – KNIME Community Hub

Component:

Multi-Line Range (Filter & Replace) – KNIME Community Hub~4wlar2Cm664Irt1D/current-state)

*Component Configuration Options*

Select the target Column Name on main input Table that requires editing

(Multi-Line Replacement Range is always set to target the 1st Column position of (Input #2), ignoring column names)

Target the row filter range start and end points via below settings:

  • Criteria Match (String / Missing or Empty / Regex Pattern)

  • String Entry for Match Criteria (*Do not leave blank in String or Regex modes*, Ignored when in Empty / Missing Mode)

  • Select which Occurrence you want to target (1st, 2nd, 3rd, etc)

  • Select an offset for your range target row from the criteria match (0=no offset, -1 up a row, 1 down a row, etc)

  • Select if you want to Keep or Filter your Target Row from the range filter

*Output Columns*

  • Adjusted Range Filtered & Replaced Table

  • Original Multi-Line Row Position Count (with inserted rows showing as Missing for easy locating)

  • Multi-Line Text Range that was filtered from the original table for review