E.1 Syntax for regular expressions
JP1/IM - EG for NNMi supports the use of regular expressions. The conventions described below must be observed when you use regular expressions.
- Note:
-
If you use regular expressions, we recommend that you use only the ones presented here, because specification of other regular expressions depends on the computer and OS.
- Organization of this subsection
(1) Normal characters
Normal characters are those that are evaluated for an exact match when they are specified in a search string. The only characters that are not treated as normal characters are the control codes and special characters.
(2) Special characters
The following are the special characters: ^ $ . * + ? | ( ) { } [ ] \. The following table explains the special characters.
Special character |
Description |
---|---|
^ |
Indicates a beginning specification match (leading-characters match). This is a special character only when it is used at the beginning of a regular expression to denote beginning characters. When this character is used at any other location, it is treated as a normal character. |
$ |
Indicates an ending specification match (trailing-characters match). This is a special character only when it is used at the end of a regular expression to denote ending characters. When this character is used at any other location, it is treated as a normal character. |
. (period) |
Indicates any one character. |
* |
Indicates that the immediately preceding character can be included any number of times or no times. |
+ |
Indicates that the immediately preceding character is included at least once. |
? |
Indicates that the immediately preceding character is included one time or not at all. |
| |
Indicates the OR condition between the regular expressions specified before and after the vertical bar. This character is used together with the special characters ( and ). |
( ) |
Indicates grouping of the enclosed regular expressions. These characters are used mainly in conjunction with the | character. |
{ } |
Indicates that the immediately preceding character is to be included as many times as the value specified within the curly brackets. |
[ ] |
Indicates that the value includes any of the characters enclosed in the square brackets. If the first character enclosed in the square brackets is the ^, the value includes any character other than the characters enclosed in the square brackets. |
\ |
Escape character. When \ is specified immediately before a special character, that special character does not perform its function as a special character and instead is treated as a normal character. Note that \n is handled as the linefeed character and \t is handled as the tab character. |