65 lines
2.1 KiB
HTML
65 lines
2.1 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
||
|
<meta http-equiv="Content-Type" content=
|
||
|
"text/html; charset=utf-8">
|
||
|
<title>Patterns</title>
|
||
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
||
|
</HEAD>
|
||
|
<body bgcolor="#FFFFFF">
|
||
|
<!-- Java sync-link -->
|
||
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
||
|
|
||
|
|
||
|
|
||
|
<h2>Patterns</h2>
|
||
|
|
||
|
<p>A pattern consists of normal characters, which match themselves,
|
||
|
and meta-characters. The meta-characters are:</p>
|
||
|
|
||
|
<p><strong>!</strong>, <strong>*</strong>, <strong>?</strong>, and
|
||
|
<strong>[</strong></p>
|
||
|
|
||
|
<p>These characters lose their special meanings if they are quoted.
|
||
|
When command or variable substitution is performed and the dollar
|
||
|
sign (<strong>$</strong>) or backquote (<strong>`</strong>) are not
|
||
|
double quoted, the value of the variable or the output of the
|
||
|
command is scanned for these characters and they are turned into
|
||
|
meta-characters.</p>
|
||
|
|
||
|
<p>An asterisk (<strong>*</strong>) matches any string of
|
||
|
characters.</p>
|
||
|
|
||
|
<p>A question mark (<strong>?</strong>) matches any single
|
||
|
character.</p>
|
||
|
|
||
|
<p>A left bracket (<strong>[</strong>) introduces a character
|
||
|
class. The end of the character class is indicated by a right
|
||
|
bracket (<strong>]</strong>). If the right bracket is missing then
|
||
|
the left bracket matches a <strong>[</strong> rather than
|
||
|
introducing a character class. A character class matches any of the
|
||
|
characters between the square brackets. A range of characters may
|
||
|
be specified using a minus (<strong>-</strong>). The character
|
||
|
class may be complemented by making an exclamation mark
|
||
|
(<strong>!</strong>) the first character of the character
|
||
|
class.</p>
|
||
|
|
||
|
<table>
|
||
|
<tr>
|
||
|
<td valign="top"><strong>Note:</strong></td>
|
||
|
<td>Specifying a range of characters may produce different results
|
||
|
from other systems because EBCDIC characters are not
|
||
|
contiguous.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p>To include a right bracket in a character class, make it the
|
||
|
first character listed (after the <strong>!</strong>, if any). To
|
||
|
include a minus in a character class, make it the first or last
|
||
|
character listed.</p>
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|