6.1.2 Descriptive conventions for directives

Organization of this subsection
(1) Regular expressions
(2) Path information to be specified in directives
(3) Comment lines
(4) Notes on specifying IPv6 addresses

(1) Regular expressions

The following table describes the regular expressions that you can use to specify directives:

Table 6-2 Regular expressions

SymbolFunctionalityUsage exampleMeaning of the usage example
.Indicates one optional character.a...cThree optional characters and then character c follow character a. matches with abcdc.
*Indicates that the preceding character is repeated for zero or more times.ab*cd*Matches with ac, abbbbc, and abbbbcd.
+Indicates that the previous character is repeated for one or more times.ab*c+Matches with abbbc. Does not match with abbb.
?Is there a previous character?abbbc?Matches with abbbc and abbb.
|Denotes the OR operationa|bc|dMatches with a, bc, or d.
[Figure]A prefix for a special character (. ^$*+?| [Figure] [](){}). Three [Figure] symbols are used to express a single [Figure].[Figure].Matches with a "." (period).
[Figure]Matches with a single [Figure] character.
^Matches at the beginning of a line.^abMatches with abcde.
$Matches at the end of a line.abc$Matches with aaabc.
{m}Indicates repetition of the preceding regular expressions for m number of times.a{5}Matches with aaaaa.
{m,}Indicates repetition of the preceding regular expressions for minimum m number of times.a{3,}Matches with aaa and aaaa. Does not match with aa.
{m,n}Repetition of the preceding regular expressions for minimum m and maximum n number of times.a{3,5}Matches with aaa, aaaa, and aaaaa. Does not match with aa and aaaaaa.
[Character string]Indicates one of the optional characters# included in the character string.[abc]* or [a-c]*Matches with aaa, bbb, ccc, cba, and aab.
[^Character string]Indicates one of the optional characters that are not included in the character string.[^0-9]Matches with one non-numeric character.
(Character string)Group the character strings.(ab)+Matches with ababab. Does not Match with ababb.
aa(xx|yy)bbMatches with aaxxbb and aayybb.
#
The following three characters have a specific meaning in the [character string].
^: It is specified after [ and used to indicate the characters that are not included in the character string.
]: It is used to denote the end of the character string.
-: It is used to denote the range of characters.
Note that the [Figure] that comes before these special character is omitted.
Specify the characters having special meaning in the [character string] as normal characters by following method. Note that, special characters excluding ^ ] - \ are interpreted as normal characters.
^ : Do not specify at the beginning of the character string. (Example)[ab^yz]
]: Specify at the beginning of the character string. (Example)[]abxy]
-: Specify at the end. (Example)[abxy-]
[Figure]: Specify as [Figure]. (Example)[[Figure]abxy]

(2) Path information to be specified in directives

In the case of directives that specify directory names, file names, or the path names, the path information that you can specify differs based on the directive type.

The path types are as shown below. Path information of each directive is to be described in the respective directive.

Note that directories and files on the network cannot be specified as path information. Directories and files on a file system that uses the network also cannot be specified.

(3) Comment lines

In the configuration file, if you add a hash mark (#) to the beginning of a line, that line becomes a comment line. However, if you enter a character string that begins with a hash mark (#) after a specified directive, the character string after the hash mark (#) is not commented out. Examples of specifying comment lines are as follows:

Corret example

#Deny from all

This line is a comment line.
Incorrect example

Deny from all    #comment

#comment is a directive specification value. #comment is not a comment.

(4) Notes on specifying IPv6 addresses

When an IPv6 address is specified in a directive, enclose the IPv6 address in square brackets ([ ]), as in [IPv6-address]. When an IPv6 address and a port number are specified in a directive, enclose the IPv6 address in square brackets ([ ]) and specify the port number after a colon (:), as in [IPv6-address]:port-number.

However, if IPv6 addresses are specified in the following directives, specify the IPv6 addresses without square brackets ([ ]):

Specify a global unicast address when using an IPv6 address.