Hitachi

JP1 Version 12 JP1/Base User's Guide


F.2 Extended regular expressions that can be used when regular expressions are extended

In JP1 products, common regular expressions can be used under Windows and UNIX by extending regular expressions. To extend regular expressions, see 3.4.5 Extending regular expressions to be used. HP-UX, Solaris, and AIX use extended regular expressions that conform to the XPG4 standard, and Linux uses extended regular expressions that conform to the POSIX1003.2 standard. Under Windows, the syntax of the XPG4 regular expressions is applied. This section explains regular expressions that seem to be used frequently.

Regular expressions that can be used when extension has been performed are listed below.

Character string

Signifies the line with the specified string.

^string

Signifies that the specified string is at the beginning of a line.

string$

Signifies that the specified string is at the end of a line. When used with the caret, matches are found for the exact character string written between the caret and dollar sign.

^string$

Signifies a line that contains the specified string only.

^$

Signifies a blank line.

(period)

The period signifies any single character other than a linefeed character.

[string]

Signifies any of the characters specified in the string enclosed by [ and ].

[character-character]

Signifies any single character within the range, in the ascending order of the character codes.

[^character-character]

Signifies any single character out of the range, in the ascending order of the character codes.

character*

Signifies a string in which the immediately preceding character is repeated at least zero times.

regular-expression|regular-expression

Signifies either the right or left regular expressions.

\special-character

Handles a special character as an ordinary character.

(regular-expression)

Groups regular expressions.