{"title":"Column Name Replacer","nodeType":"Manipulator","id":"*v2rCBWb37Ywxh2AG","factoryName":"org.knime.base.node.preproc.columnrenameregex.ColumnRenameRegexNodeFactory","factoryId":"org.knime.base.node.preproc.columnrenameregex.ColumnRenameRegexNodeFactory","path":["Manipulation","Column","Convert & Replace"],"owner":"knime","ownerAccountId":"account:team:b5f0848f-496d-4e6a-b869-fa3532248db7","description":"<p>Renames all columns based on a search &amp; replace pattern. The search pattern is a regular expression, literal, or wildcard expression.</p>\n            \n            <p>In the simplest case, you can search and replace string literals. E.g. if the input columns are called &#34;Foo 1&#34;, &#34;Foo 2&#34;, &#34;Foo 3&#34;, etc and the search string is &#34;Foo&#34;, the replacement is &#34;Bar&#34;, the output would be &#34;Bar 1&#34;, &#34;Bar 2&#34;, &#34;Bar 3&#34;.</p>\n            \n            <p>More complicated cases contain <a href=\"http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#cg\" rel=\"ugc nofollow noopener noreferrer\"> capturing groups</a> , i.e. expressions in parentheses that, if matched in a column name, are saved. The groups can be referenced in the replacement string using <tt>$g</tt> , whereby <tt>g</tt> is a number 0-9. These placeholders will be replaced by the original occurrence in the input column name. For instance, to rename the columns that are produced by the Data Generator node (they follow a scheme <tt>Universe_&lt;number1&gt;_&lt;number2&gt;</tt> ) to <tt>&lt;number2&gt; (Uni &lt;number1&gt;)</tt> , you would use as search string: &#34;Universe_(\\d&#43;)_(\\d&#43;)&#34; and as replacement: &#34;$2 (Uni $1)&#34;.</p>\n            \n            <p>The special sequence <tt>$i</tt> represents the current column index (unless escaped by &#39;\\&#39; (backslash)). E.g. in order to precede each column name with the column index, use as search string &#34;(^.&#43;$)&#34;, capturing the entire column name in a group, and as replacement &#34;$i: $1&#34;.</p>\n            \n            <p>Further documentation regarding regular expressions can be found in the Java API documentation, in particular the classes <a href=\"http://download.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html\" rel=\"ugc nofollow noopener noreferrer\"> Pattern</a> and <a href=\"http://download.oracle.com/javase/6/docs/api/java/util/regex/Matcher.html\" rel=\"ugc nofollow noopener noreferrer\"> Matcher</a> .</p>\n            \n        \n        ","shortDescription":"Renames all columns based on a regular expression search & replace pattern.","keywords":["regex","replace","rename","column","Column Rename (Regex)","Column Rename (Replace)"],"deprecated":false,"streamable":true,"tags":["Manipulation","Column","Convert & Replace","Streamable"],"icon":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowYjM2YWM5Ny01ZWJhLTQwZTctOTE4OS1iYmU4ZDdkMGYyNGUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzczMEEwMDAxODM0MTFFNTgxM0FFMEQwQTc0Qzg5QTIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzczMDlGRkYxODM0MTFFNTgxM0FFMEQwQTc0Qzg5QTIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpjZTBmYzg4ZC1kNjkyLTQ5NDEtOTZiOC03ODIxMjliYWZkYWIiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MGIzNmFjOTctNWViYS00MGU3LTkxODktYmJlOGQ3ZDBmMjRlIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+1K2y1wAAAItJREFUeNqsU10PgCAI7JoPPbRe2+r//8YeSZcUkR9k3cZUnCdwACLqGACuQxmQ704Ep7RlXulw0+POCorWjP8IROjUlEKOwOkQ/aUXA3XmSBIIoH6sa6jkJmkqv2wKvO+ZVEVihnsTOmMap80vw60YFhWShbQS5FT43IkosbJcoTeUPz2WLeO8CzAApSqFGiaPjSoAAAAASUVORK5CYII=","views":[],"inPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Input table","description":"The table with columns to rename."}],"outPorts":[{"objectClass":"org.knime.core.node.BufferedDataTable","color":"000000","dataType":"Table","optional":false,"name":"Output table","description":"The table with renamed columns."}],"dynInPorts":[],"dynOutPorts":[],"additionalSiteInformation":{"url":"https://update.knime.com/analytics-platform/5.12","trusted":true,"enabledByDefault":true,"name":"KNIME Analytics Platform 5.12 Update Site","version":"5.12.0"},"dialog":[{"sectionName":"Options","fields":[{"name":"Pattern type","description":"Select the type of pattern which you want to use.\n<ul><li><i>Literal</i> matches the pattern as is.</li><li><i>Wildcard</i> matches <tt>*</tt> to zero or more arbitrary characters and matches <tt>?</tt> to any single character.</li><li><i>Regular expression</i> matches using the full functionality of Java regular expressions, including back references in the replacement text. See the <a href=\"http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html\" rel=\"ugc nofollow noopener noreferrer\">Java API </a> for details.</li></ul>","optional":false},{"name":"Use backslash as escape character","description":"If checked, the backslash character can be used to escape special characters. For instance, <tt>\\?</tt> will match the literal character <tt>?</tt> instead of an arbitrary character. In order to match a backslash you need to escape the backslash, too ( <tt>\\</tt> ).","optional":false},{"name":"Case sensitive","description":"Specifies whether matching will distinguish between upper and lower case letters.","optional":false},{"name":"Pattern","description":"A literal string, wildcard pattern or regular expression, depending on the pattern type selected above.","optional":false},{"name":"Replacement text","description":"The replacement text for the pattern. If you are using a regular expression, you may also use backreferences (e.g. $1 to refer to the first capture group. Named capture groups can also be used with (?&lt;group&gt;) and ${group} to refer to them).","optional":false},{"name":"Replacement strategy","description":"Select what to replace in case a string matches a pattern.\n<ul><li><i>Whole string</i> replaces the entire string with the replacement string, requiring an exact match of the whole string.</li><li><i>All occurrences</i> replaces all occurrences of the pattern with the replacement string. Note that when e.g. matching on the RegEx-pattern <tt>.*</tt> , an empty string at the end of the input is also matched and replaced. To avoid that, use e.g. the pattern <tt>^.*</tt> to indicate that the match has to start at the beginning of the string.</li></ul>","optional":false}]}],"links":[],"kudos":[{"accountId":"account:user:751e2226-1074-4bf6-b7af-29a0c091d977","user":"gimbo","date":"2021-02-18T18:43:36+00:00"}],"kudosCount":1,"bundleInformation":{"bundleVersion":"5.12.0.v202606261225","bundleName":"KNIME Base Nodes","bundleSymbolicName":"org.knime.base","bundleVendor":"KNIME AG, Zurich, Switzerland","featureSymbolicName":"org.knime.features.base","featureName":"KNIME Base nodes","featureVersion":"5.12.0.v202606261225","featureVendor":"KNIME AG, Zurich, Switzerland","extensionId":"*bjR3r1yWOznPIEXS"},"frequentSuccessors":[{"id":"*ZgYyOm1P9VJVBE9e","factoryName":"org.knime.base.node.preproc.joiner.Joiner2NodeFactory","probability":0.15568570034163007},{"id":"*v2rCBWb37Ywxh2AG","factoryName":"org.knime.base.node.preproc.columnrenameregex.ColumnRenameRegexNodeFactory","probability":0.054660810151293315},{"id":"*CCMhDNWHYFXV506q","factoryName":"org.knime.base.node.meta.looper.LoopEndJoin2NodeFactory","probability":0.04880429477794046},{"id":"*DOkyMaii62U05xZ1","factoryName":"org.knime.base.node.preproc.filter.column.DataColumnSpecFilterNodeFactory","probability":0.04538799414348463},{"id":"*PHWv6FsABEjrSc76","factoryName":"org.knime.base.node.preproc.rename.RenameNodeFactory","probability":0.03953147877013177},{"id":"*2fI5rIsFDCFPHc0R","factoryName":"org.knime.ext.jep.JEPNodeFactory","probability":0.030258662762323085},{"id":"*6k1xlCi486vumV3V","factoryName":"org.knime.base.node.preproc.columnresorter.ColumnResorterNodeFactory","probability":0.029282576866764276},{"id":"*AApA5VHd41CVDe7u","factoryName":"org.knime.base.node.meta.looper.LoopEndNodeFactory","probability":0.02879453391898487},{"id":"*eOn8ibZnxIkY7XhT","factoryName":"org.knime.base.node.preproc.stringmanipulation.StringManipulationNodeFactory","probability":0.027330405075646658},{"id":"*_zMUh-EpYjdvFKW9","factoryName":"org.knime.base.node.preproc.columnappend.ColumnAppenderNodeFactory","probability":0.026842362127867253}]}
