Knime Format Check

Hi,

I'm new on this forum. Let's consider a table with only one field. I'd like to make sure that the format for each row is exactly (even for the lenght) as follows:

XX-$$$,$$         (where X is a string and $ is a number)

Eg. 

AC-333,20
BZ-436,22
QQ-333,42


So I would extract incorrect records, such as:

AC-333,2
AC/333,22
AC333,22
23-333,22

Please, could you help me? If I need to use the java snippet, could you explain me step by step how to achieve this result? Thanks in advance.

You can use the row splitter node so that the correct format are output at one port and the incorrect format at the second port.

In the node config, choose Regular Expression, and in the filter expression box enter:

[A-Z]{2}-[0-9]{3},[0-9]{2}

So this is meaning letter from A to Z and must be two of these,

Then the dash must be present followed by 3 numbers, etc.

 

Hope that helps.

Simon.

It works! Thank you very much!

Hi all,

Please your help!

How can I convert the format below?

 

Current       TO

1,270.0    1,270.00
​1.270        1,270.00
​625.5           625.50

 

Thank´s a lot