PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 1ms

/jEdit/tags/jedit-4-0-pre3/doc/users-guide/globs.xml

#
XML | 63 lines | 60 code | 1 blank | 2 comment | 0 complexity | cd9ab15fd9c9bed83e6afbe216353d73 MD5 | raw file
 1<!-- jEdit buffer-local properties: -->
 2<!-- :indentSize=1:noTabs=true: -->
 3
 4<appendix id="globs"><title>Glob Patterns</title>
 5 <para>
 6  jEdit uses glob patterns similar to those in the various
 7  Unix shells to implement file name filters in the file system browser.
 8  Glob patterns resemble regular expressions somewhat,
 9  but have a much simpler
10  syntax. The following character sequences have special meaning within a glob
11  pattern:
12 </para>
13 <itemizedlist>
14  <listitem><para><literal>?</literal> matches any one character</para></listitem>
15  <listitem><para><literal>*</literal> matches any number of characters</para></listitem>
16  <listitem><para><literal>{<replaceable>a</replaceable>,<replaceable>b</replaceable>,<replaceable>c</replaceable>}</literal>
17  matches any one of <replaceable>a</replaceable>, <replaceable>b</replaceable> or
18  <replaceable>c</replaceable></para></listitem>
19  <listitem><para><literal>[<replaceable>abc</replaceable>]</literal> matches
20  any character in
21  the set <replaceable>a</replaceable>, <replaceable>b</replaceable> or
22  <replaceable>c</replaceable></para></listitem>
23  <listitem><para><literal>[^<replaceable>abc</replaceable>]</literal> matches
24  any character not
25  in the set <replaceable>a</replaceable>, <replaceable>b</replaceable> or
26  <replaceable>c</replaceable></para></listitem>
27  <listitem><para><literal>[<replaceable>a-z</replaceable>]</literal> matches
28  any character in the
29  range <replaceable>a</replaceable> to <replaceable>z</replaceable>, inclusive.
30  A leading or trailing dash will be interpreted literally</para></listitem>
31 </itemizedlist>
32 <para>
33  Within a character class expression, the following sequences have special meaning:
34 </para>
35 <itemizedlist>
36  <listitem><para><literal>[:alnum:]</literal> Any alphanumeric
37  character</para></listitem>
38  <listitem><para><literal>[:alpha:]</literal> Any alphabetical character</para></listitem>
39  <listitem><para><literal>[:blank:]</literal> A space or horizontal tab</para></listitem>
40  <listitem><para><literal>[:cntrl:]</literal> A control character</para></listitem>
41  <listitem><para><literal>[:digit:]</literal> A decimal digit</para></listitem>
42  <listitem><para><literal>[:graph:]</literal> A non-space, non-control character</para></listitem>
43  <listitem><para><literal>[:lower:]</literal> A lowercase letter</para></listitem>
44  <listitem><para><literal>[:print:]</literal> Same as <literal>[:graph:]</literal>, but also space and tab</para></listitem>
45  <listitem><para><literal>[:punct:]</literal> A punctuation character</para></listitem>
46  <listitem><para><literal>[:space:]</literal> Any whitespace character, including newlines</para></listitem>
47  <listitem><para><literal>[:upper:]</literal> An uppercase letter</para></listitem>
48  <listitem><para><literal>[:xdigit:]</literal> A valid hexadecimal digit</para></listitem>
49 </itemizedlist>
50 <para>
51  Here are some example glob patterns:
52 </para>
53 <itemizedlist>
54  <listitem><para><userinput>*</userinput> - all files</para></listitem>
55  <listitem><para><userinput>*.java</userinput> - all files whose names end with
56  <quote>.java</quote></para></listitem>
57  <listitem><para><userinput>*.{c,h}</userinput> - all files whose names end
58  with either
59  <quote>.c</quote> or <quote>.h</quote></para></listitem>
60  <listitem><para><userinput>*[^~]</userinput> - all files whose names do not
61  end with <quote>~</quote></para></listitem>
62 </itemizedlist>
63</appendix>