RegEx match complete word with special characters
------------------
Rule Engine
$my_text$ MATCHES /^.*(S\\.A\\.S\\.).*$/ => "contains S.A.S."
Column Expressions
else if (regexMatcher(column("my_text"), "^.*(S\.A\.S\.).*$")) {true}
String Manipulation
regexMatcher($my_text$, "^.*(S\.A\.S\.).*$")
Java Snippet (simple)
Pattern p = Pattern.compile("(^.*)(S\.A\.S\.)(.*$)");
Matcher m = p.matcher($my_text$);
Java Snippet
Pattern p = Pattern.compile("^.*(S\\.A\\.S\\.).*$");
Matcher m = p.matcher(c_my_text);
Workflow
RegEx match complete word with special characters - using Rule Engine, Column Expressions, String Manipulation, and Java Snippets
External resources
- (48551) - forum entry
- Component by natanaeldgsantos - Regex Find All
- Component by takbb - Regex String Stripper
- Component by takbb - Regex String Replacer
- more RegEx examples from the KNIME hub
- victor_palacios - Various Examples of Regex in KNIME
- hayasaka - Various Examples of Regex in KNIME
- KNIME and Java - simple if then else - with some string conversion
- RegEx - remove line breaks and special characters from column name
Used extensions & nodes
Created with KNIME Analytics Platform version 4.6.3
Legal
By using or downloading the workflow, you agree to our terms and conditions.