InterSystems IRIS for Health 2021.1Opens in a new window > Class Reference > %SYS namespace > %ZHSLIB.PackageManager.Core.RegExString

%ZHSLIB.PackageManager.Core.RegExString

datatype class %ZHSLIB.PackageManager.Core.RegExString extends %Library.String

ODBC Type: VARCHAR

A string datatype definition which extends %Library.String with additional regex pattern validation.
From https://community.intersystems.com/post/string-datatype-regular-expression-validation

Method Inventory

Parameters

final parameter DISPLAYLIST;
Set DISPLAYLIST to empty and final, as it is not relevant on this type, but is inherited from %Library.String
final parameter PATTERN;
Set PATTERN to empty and final, as it is not relevant on this type, but is inherited from %Library.String
parameter REGEX;
Set a valid regex pattern for value validation
final parameter VALUELIST;
Set VALUELIST to empty and final, as it is not relevant on this type, but is inherited from %Library.String
parameter XMLPATTERN;
The XMLPATTERN to regex by default. Can be overridden.

Methods

classmethod IsValid(%val As %Library.RawString) as %Status [ Language = objectscript ]
Tests if the logical value %val, which is a string, is valid. The validation is based on the class parameter settings used for the class attribute this data type is associated with. In this case, MINLEN, MAXLEN, and REGEX.

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new window