PageRenderTime 150ms CodeModel.GetById 138ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/42docs/users-guide/globs.html

#
HTML | 31 lines | 31 code | 0 blank | 0 comment | 0 complexity | 977af92163f87da1eddb18a566057f3f MD5 | raw file
 1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Appendix D. Glob Patterns</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="jEdit 4.2 User's Guide"><link rel="up" href="using-jedit-part.html" title="Part I. Using jEdit"><link rel="previous" href="history.html" title="Appendix C. History Text Fields"><link rel="next" href="regexps.html" title="Appendix E. Regular Expressions"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix D. Glob Patterns</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="history.html">Prev</a> </td><th width="60%" align="center">Part I. Using jEdit</th><td width="20%" align="right"> <a accesskey="n" href="regexps.html">Next</a></td></tr></table><hr></div><div class="appendix" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="globs"></a>Appendix D. Glob Patterns</h2></div></div><div></div></div><p>
 2  jEdit uses glob patterns similar to those in the various
 3  Unix shells to implement file name filters in the file system browser.
 4  Glob patterns resemble regular expressions somewhat,
 5  but have a much simpler
 6  syntax. The following character sequences have special meaning within a glob
 7  pattern:
 8 </p><div class="itemizedlist"><ul type="disc"><li><p><tt class="literal">?</tt> matches any one character</p></li><li><p><tt class="literal">*</tt> matches any number of characters</p></li><li><p><tt class="literal">{!<i class="replaceable"><tt>glob</tt></i>}</tt>
 9  Matches anything that does <span class="emphasis"><em>not</em></span> match
10  <i class="replaceable"><tt>glob</tt></i></p></li><li><p><tt class="literal">{<i class="replaceable"><tt>a</tt></i>,<i class="replaceable"><tt>b</tt></i>,<i class="replaceable"><tt>c</tt></i>}</tt>
11  matches any one of <i class="replaceable"><tt>a</tt></i>, <i class="replaceable"><tt>b</tt></i> or
12  <i class="replaceable"><tt>c</tt></i></p></li><li><p><tt class="literal">[<i class="replaceable"><tt>abc</tt></i>]</tt> matches
13  any character in
14  the set <i class="replaceable"><tt>a</tt></i>, <i class="replaceable"><tt>b</tt></i> or
15  <i class="replaceable"><tt>c</tt></i></p></li><li><p><tt class="literal">[^<i class="replaceable"><tt>abc</tt></i>]</tt> matches
16  any character not
17  in the set <i class="replaceable"><tt>a</tt></i>, <i class="replaceable"><tt>b</tt></i> or
18  <i class="replaceable"><tt>c</tt></i></p></li><li><p><tt class="literal">[<i class="replaceable"><tt>a-z</tt></i>]</tt> matches
19  any character in the
20  range <i class="replaceable"><tt>a</tt></i> to <i class="replaceable"><tt>z</tt></i>, inclusive.
21  A leading or trailing dash will be interpreted literally</p></li></ul></div><p>
22  In addition to the above, a number of &#8220;<span class="quote">character class
23  expressions</span>&#8221; may be used as well:
24 </p><div class="itemizedlist"><ul type="disc"><li><p><tt class="literal">[[:alnum:]]</tt> matches any alphanumeric
25  character</p></li><li><p><tt class="literal">[[:alpha:]]</tt> matches any alphabetical character</p></li><li><p><tt class="literal">[[:blank:]]</tt> matches a space or horizontal tab</p></li><li><p><tt class="literal">[[:cntrl:]]</tt> matches a control character</p></li><li><p><tt class="literal">[[:digit:]]</tt> matches a decimal digit</p></li><li><p><tt class="literal">[[:graph:]]</tt> matches a non-space, non-control character</p></li><li><p><tt class="literal">[[:lower:]]</tt> matches a lowercase letter</p></li><li><p><tt class="literal">[[:print:]]</tt> same as <tt class="literal">[[:graph:]]</tt>, but also space and tab</p></li><li><p><tt class="literal">[[:punct:]]</tt> matches a punctuation character</p></li><li><p><tt class="literal">[[:space:]]</tt> matches any whitespace character, including newlines</p></li><li><p><tt class="literal">[[:upper:]]</tt> matches an uppercase letter</p></li><li><p><tt class="literal">[[:xdigit:]]</tt> matches a valid hexadecimal digit</p></li></ul></div><p>
26  Here are some examples of glob patterns:
27 </p><div class="itemizedlist"><ul type="disc"><li><p><b class="userinput"><tt>*</tt></b> - all files.</p></li><li><p><b class="userinput"><tt>*.java</tt></b> - all files whose names end with
28  &#8220;<span class="quote">.java</span>&#8221;.</p></li><li><p><b class="userinput"><tt>*.[ch]</tt></b> - all files whose names end
29  with either
30  &#8220;<span class="quote">.c</span>&#8221; or &#8220;<span class="quote">.h</span>&#8221;.</p></li><li><p><b class="userinput"><tt>[^#]*</tt></b> - all files whose names do not
31  start with &#8220;<span class="quote">#</span>&#8221;.</p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="history.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="using-jedit-part.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="regexps.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix C. History Text Fields </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix E. Regular Expressions</td></tr></table></div></body></html>