comparison cutils/util/glob.py @ 311:6d1add815d14

FIX: doc string for glob syntax rules
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 10 Mar 2025 01:45:09 +0100
parents 1371ceb6fad6
children 48430941c18c
comparison
equal deleted inserted replaced
310:1371ceb6fad6 311:6d1add815d14
28 example. 28 example.
29 29
30 - The ``[ ]`` characters are a bracket expression that match a single 30 - The ``[ ]`` characters are a bracket expression that match a single
31 character of a name component out of a set of characters. For example, 31 character of a name component out of a set of characters. For example,
32 ``[abc]`` matches "``a``", "``b``", or "``c``". The hyphen (``-``) may 32 ``[abc]`` matches "``a``", "``b``", or "``c``". The hyphen (``-``) may
33 be used to specify a range so ``'[^/]*'[a-z]`` specifies a range that matches 33 be used to specify a range so ``[a-z]`` specifies a range that matches
34 from "``a``" to "``z``" (inclusive). These forms can be mixed so 34 from "``a``" to "``z``" (inclusive). These forms can be mixed so
35 ``[abce-g]`` matches "``a``", "``b``", "``c``", "``ey", "``f``" or 35 ``[abce-g]`` matches "``a``", "``b``", "``c``", "``e``", "``f``" or
36 "``g``". 36 "``g``".
37 37
38 If the character after the ``[`` is a ``!`` then it is used for negation 38 If the character after the ``[`` is a ``!`` then it is used for negation
39 so ``[!a-c]`` matches any character except "``a``", "``b``", or "``c``". 39 so ``[!a-c]`` matches any character except "``a``", "``b``", or "``c``".
40 40