HULFT-27216

When "Yes" (Y) is specified for Use Regular Expression (REGEX) in the File Trigger Information and one or more multibyte characters specified for the name of a file to be monitored, some characters are incorrectly recognized as regular expression metacharacters

Phenomenon

When "Yes" (Y) is specified for Use Regular Expression (REGEX) in the File Trigger Information and one or more of the multibyte characters shown below are specified for File Name (TARGETFILENAME), those characters are incorrectly recognized as regular expression metacharacters.

  • Locale-specific multibyte characters that contain the byte 0x5b

  • Locale-specific multibyte characters that contain the byte 0x5d

 

In this situation, either of the following problems may occur:

[Case 1]

An error occurs when you save the File Trigger Information, which prevents it from being saved.

If a multibyte character specified for File Name (TARGETFILENAME) contains the byte 0x5b (Example: "閏"), the character is incorrectly recognized as a regular expression metacharacter and the following message is output, which indicates that there is an error in the regular expression pattern:

 

[Output message]

The file name is invalid. The regular expression pattern is wrong. premature end of char-class

or

A system error (99) Detail Code = W00973 The value of File Name in the File Trigger Information is invalid.

 

[Case 2]

The File Trigger Information can be saved even with an incorrectly written regular expression.

If a multibyte character specified for File Name (TARGETFILENAME) contains the byte 0x5d (Example: "云"), the character is incorrectly recognized as a regular expression metacharacter, and this incorrect regular expression may be interpreted as a correct one, allowing the information to be saved.

In this case, an error occurs when the file trigger activates, which outputs the following message to the log:

 

[Output message]

"Error -> hh:mm:ss E229053 An error occurred during regular expression matching processing for the trigger ID (999999): premature end of char-class. (ThreadID=999999)"

Severity level

C: medium

Affected versions

From Ver.8.1.0 to Ver.8.4.1

Modified version

Ver.10.2.0

Condition to reproduce

This phenomenon may occur when all of the following conditions are met:

  • "Yes" (Y) is specified for Use Regular Expression (REGEX) in the File Trigger Information

  • One or more multibyte characters shown below are specified for File Name (TARGETFILENAME) in the File Trigger Information

    • Locale-specific multibyte characters that contain the byte 0x5b

    • Locale-specific multibyte characters that contain the byte 0x5d

Alternative workaround

This phenomenon can be avoided by using the Import function of HULFT Manager.

Status description

Even if the above conditions are met, the multibyte characters specified for File Name (TARGETFILENAME) are correctly recognized as multibyte characters as shown below.

 

[Case 1]

The File Trigger Information is saved because the multibyte characters are correctly recognized.

If a locale-specific multibyte character specified for File Name (TARGETFILENAME) contains the byte 0x5b, the character is correctly recognized as a multibyte character instead of a regular expression metacharacter. Therefore, the File Trigger Information is saved.

 

[Case 2]

The File Trigger Information cannot be saved with an incorrectly written regular expression because multibyte characters are correctly recognized.

If a locale-specific multibyte character specified for File Name (TARGETFILENAME) contains the byte 0x5d, the character is recognized as a multibyte character instead of a regular expression metacharacter. This means that an incorrect regular expression is not interpreted as a correct regular expression.

As a result, an error occurs when you register File Trigger Information, preventing it from being saved.

 

[Output message]

The file name is invalid. The regular expression pattern is wrong. premature end of char-class