HELP: Regular expression for validation TYPE: OBJECT SYNTAX: REGEXP(PATTERN='str',NOCASE,MULTILINE,DOT4ALL,EXTENDED,FMTERR,IGNREC)
This object can be used to activate the validation of the content of a string. For this a Perl-compatible regular expression can be defined.
Writing regular expressions may seem like a daunting task if you never did so before. You can find a tutorial that will get you started quickly here:
https://www.regular-expressions.info/quickstart.html
Countless other tutorials and documentation for regular expressions can be found on the web. We recommend to consult these resources to familiarize yourself with regular expressions.
Advanced users can find the complete syntax documentation for writing regular expression patterns by following this URL:
https://www.pcre.org/current/doc/html/pcre2pattern.html
At read you can enforce an format error for better format detection. This could be useful for example in table support to define a row definition for all German transactions where the IBAN starts with 'DE' and the same for all transaction with 'UK' and so on, to separate the content in different tables per country.
Additional you can ignore all records without a successful match of the regular expression. In this case the unmatching lines will be skipped.
By default a mismatch will result in a validation error.
Several flags are supported to control the behavior of the validation process.
STRING: PATTERN='str' - Pattern of regular expression for validation
SWITCH: NOCASE - Case insensitive matching
SWITCH: MULTILINE - '^' and '$' match start/end of line instead of start/end of whole string
SWITCH: DOT4ALL - Change '.' to match any character whatsoever, even a newline, which normally it would not match
SWITCH: EXTENDED - Makes parser ignore whitespace and '#' comments within the pattern (can be used for readability)
SWITCH: FMTERR - Return a format error if no match (improve auto detection)
SWITCH: IGNREC - Remove every record that the regex does not match