Forums: Define.xml
Hi Jagruthi,
This is a rule for data and not for metadata, isn't it? I'm confused as you put the question in the Define.xml section.
In any case, I think you are right that FDAC216 does not match the regex in the 3.1.2 configuration. Especially the "or '.' as an entire value" part, I would also read it as only one dot should not be an entire value.
In general your regex makes perfect sense, but it will not catch missing value (^$) assuming P21 trims trailing spaces and will not catch strings consisting of spaces, assuming P21 does not trim trailing spaces.
I think the FDA rule regex can be written as:
^[^.]?$|^[^ ]. if the trailing spaces are trimmed
^[^.]$|^[^ ].|^ +$ if the trailing spaces are not trimmed
Pinnacle 21 test ID SD1021 (Publisher ID FDAC216) states "Character values should not have leading space ' ' characters, or '.' as an entire value. The only exceptions are COVALn and TSVALn variables."
However, when Pinnacle 21 is run using "SDTM 3.1.2 (FDA).xml", it is incorrectly identifying character strings containing newline characters as having failed the test. For example, the string:
"A string containing
a newline character"
causes Pinnacle 21 to issue the SD1021 warning.
The regular expression for SD1021 is defined in SDTM 3.1.2 (FDA).xml as "^((?!^[ \t]|^\.+$).)*$". Should it be changed to "^\.+[^.]|^[^\.\s]" and run with the Perl regex "/s" modifier - i.e., /^\.+[^.]|^[^\.\s]/s to implement the test correctly.
The current SD1021 regular expression seem to be a liberal interpretation of the FDA rule - it includes a tab within the definition of "space" and it interprets a string of multiple periods as the same as a single period. A strict interpretation of FDAC216 suggests the regular expression should be "^[^. ]$|^[^ .]|^\..+".
Do you agree?