Keep getting error in the string manipulation

I was working on below nodes

This is to ensure that the path that I wanted to consolidation will avoid error in the output. But when I use regexReplace(C:\Users\zkt12\Documents\Conso\Lease\KNIME\BU Sub 2$, “.*\\\(\d±\d+)\.xlsx$”, “$1”) I am getting below error
image

I know something is wrong in my expression but dont know what it is. Can someone help?

Hello @TLKNW,

You have $ sign at the end of a string and not at the beginning. If that’s is column name then add $ sign at the beginning. If that is string then you need to have quotation marks around.

Br,
Ivan

1 Like

I added $ a the beginning of the path and I get below error message:

failed to apply settings: No such column: C:Users zkt12Documents ConsoLeaseKNIMEBU Sub 2 (at line 1)

Hello @TLKNW,

then I assume there is no column with such name :slight_smile:

Probably due to loop as column name (which is actually file name) is changing. You should think about re-designing your workflow.

Br,
Ivan

Is that really a column? If so the name is illegal, it must not include dollar signs $. If it is a string it must be quoted, add ” at both ends, like the previous reply implied.

1 Like