Is the file you are editing in IRISLIB or some other Read-Only database? If so, use the System Management Portal (SMP) to turn off the database Read-Only option.
I am not sure exactly what you want to do. Is check1 just an ordinary string, or might it sometimes be a string that starts with a number (like a %Status variable)?
The unary plus operator (+) turns a string operand into a number. If the string starts with the syntax of a number then +string returns that number and ignores characters in the string following the numeric syntax. If the string does not start with a number (this includes the empty string) then +string returns 0. It is possible for +string to signal <MAXNUMBER> if the characters at the beginning of string are too large for conversion to the computational numbers supported by ObjectScript.
You could try
ret:+check1 check1
which would return check1 only if it were a non-empty string that starts with a non-zero number.
If you want to return a string value that could be tested as a boolean that you have to append "1" to the front of the string if +string=0 is true.
The Class Reference pages for IRIS, available in any IRIS installation, describe all the classes installed in the installation. The Class Reference for the %Regex.Matcher class documents that the %Regex.Matcher class comes from the International Components for Unicode (ICU). The ICU maintains web pages at https://icu.unicode.org . The class reference documentation also contains the following statement for ICU documentation specific to the IRIS %Regex:
{quote}The definition and features of the ICU regular expression package can be found in https://unicode-org.github.io/icu/userguide/strings/regexp.html .{quote}
Additional documentation on the Unicode Regex package specific to how it interacts with the Unicode character set can be found at https://www.unicode.org/reports/tr18/ .