CSV file validation: Validate number of fields in each line of CSV file using Regular Expression

How to validate if a CSV file has equal number of fields in each line using isMatch activity?

Here is CSV validation workflow for reference:

ValidateCSV.zip (4.2 KB)

The regular expression below validates if each line must have exactly 4 fields:
^(?!(.*;){4})(.*;){3}.*$

General Format:

^(?!(.*CSV_CHAR){EXACT_NUM})(.*EXACT_NUM){EXACT_NUM-1}.*$

CSV_CHAR = semi-colon
EXACT_NUM = 4

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.