1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2013-03-22 01:06+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man3/fnmatch.3:28
26 #: build/C/man3/fnmatch.3:28
32 #: build/C/man3/fnmatch.3:28 build/C/man3/glob.3:34 build/C/man3/re_comp.3:27 build/C/man3/regex.3:34
38 #: build/C/man3/fnmatch.3:28 build/C/man3/glob.3:34 build/C/man7/glob.7:26 build/C/man3/re_comp.3:27 build/C/man3/regex.3:34 build/C/man7/regex.7:37 build/C/man3/wordexp.3:24
40 msgid "Linux Programmer's Manual"
44 #: build/C/man3/fnmatch.3:29 build/C/man3/glob.3:35 build/C/man7/glob.7:27 build/C/man3/re_comp.3:28 build/C/man3/regex.3:35 build/C/man7/regex.7:38 build/C/man3/wordexp.3:25
50 #: build/C/man3/fnmatch.3:31
51 msgid "fnmatch - match filename or pathname"
55 #: build/C/man3/fnmatch.3:31 build/C/man3/glob.3:37 build/C/man3/re_comp.3:30 build/C/man3/regex.3:37 build/C/man3/wordexp.3:27
61 #: build/C/man3/fnmatch.3:34
63 msgid "B<#include E<lt>fnmatch.hE<gt>>\n"
67 #: build/C/man3/fnmatch.3:36
70 "B<int fnmatch(const char *>I<pattern>B<, const char *>I<string>B<, int "
75 #: build/C/man3/fnmatch.3:37 build/C/man3/glob.3:49 build/C/man7/glob.7:29 build/C/man3/re_comp.3:40 build/C/man3/regex.3:53 build/C/man7/regex.7:40 build/C/man3/wordexp.3:42
81 #: build/C/man3/fnmatch.3:45
83 "The B<fnmatch>() function checks whether the I<string> argument matches the "
84 "I<pattern> argument, which is a shell wildcard pattern."
88 #: build/C/man3/fnmatch.3:50
90 "The I<flags> argument modifies the behavior; it is the bitwise OR of zero or "
91 "more of the following flags:"
95 #: build/C/man3/fnmatch.3:50
97 msgid "B<FNM_NOESCAPE>"
101 #: build/C/man3/fnmatch.3:54
103 "If this flag is set, treat backslash as an ordinary character, instead of an "
108 #: build/C/man3/fnmatch.3:54
110 msgid "B<FNM_PATHNAME>"
114 #: build/C/man3/fnmatch.3:62
116 "If this flag is set, match a slash in I<string> only with a slash in "
117 "I<pattern> and not by an asterisk (*) or a question mark (?) metacharacter, "
118 "nor by a bracket expression ([]) containing a slash."
122 #: build/C/man3/fnmatch.3:62
124 msgid "B<FNM_PERIOD>"
128 #: build/C/man3/fnmatch.3:73
130 "If this flag is set, a leading period in I<string> has to be matched exactly "
131 "by a period in I<pattern>. A period is considered to be leading if it is "
132 "the first character in I<string>, or if both B<FNM_PATHNAME> is set and the "
133 "period immediately follows a slash."
137 #: build/C/man3/fnmatch.3:73
139 msgid "B<FNM_FILE_NAME>"
143 #: build/C/man3/fnmatch.3:76
144 msgid "This is a GNU synonym for B<FNM_PATHNAME>."
148 #: build/C/man3/fnmatch.3:76
150 msgid "B<FNM_LEADING_DIR>"
154 #: build/C/man3/fnmatch.3:84
156 "If this flag (a GNU extension) is set, the pattern is considered to be "
157 "matched if it matches an initial segment of I<string> which is followed by a "
158 "slash. This flag is mainly for the internal use of glibc and is only "
159 "implemented in certain cases."
163 #: build/C/man3/fnmatch.3:84
165 msgid "B<FNM_CASEFOLD>"
169 #: build/C/man3/fnmatch.3:88
171 "If this flag (a GNU extension) is set, the pattern is matched "
172 "case-insensitively."
176 #: build/C/man3/fnmatch.3:88 build/C/man3/glob.3:259 build/C/man3/re_comp.3:58 build/C/man3/regex.3:251 build/C/man3/wordexp.3:157
182 #: build/C/man3/fnmatch.3:95
184 "Zero if I<string> matches I<pattern>, B<FNM_NOMATCH> if there is no match or "
185 "another nonzero value if there is an error."
189 #: build/C/man3/fnmatch.3:95 build/C/man3/glob.3:273 build/C/man3/re_comp.3:66 build/C/man3/regex.3:308 build/C/man3/wordexp.3:187
191 msgid "CONFORMING TO"
195 #: build/C/man3/fnmatch.3:100
197 "POSIX.2. The B<FNM_FILE_NAME>, B<FNM_LEADING_DIR>, and B<FNM_CASEFOLD> "
198 "flags are GNU extensions."
202 #: build/C/man3/fnmatch.3:100 build/C/man3/glob.3:316 build/C/man7/glob.7:208 build/C/man3/re_comp.3:72 build/C/man3/regex.3:310 build/C/man7/regex.7:286 build/C/man3/wordexp.3:213
208 #: build/C/man3/fnmatch.3:106
209 msgid "B<sh>(1), B<glob>(3), B<scandir>(3), B<wordexp>(3), B<glob>(7)"
213 #: build/C/man3/fnmatch.3:106 build/C/man3/glob.3:327 build/C/man7/glob.7:214 build/C/man3/re_comp.3:76 build/C/man3/regex.3:316 build/C/man7/regex.7:291 build/C/man3/wordexp.3:216
219 #: build/C/man3/fnmatch.3:113 build/C/man3/glob.3:334 build/C/man7/glob.7:221 build/C/man3/re_comp.3:83 build/C/man3/regex.3:323 build/C/man7/regex.7:298 build/C/man3/wordexp.3:223
221 "This page is part of release 3.50 of the Linux I<man-pages> project. A "
222 "description of the project, and information about reporting bugs, can be "
223 "found at http://www.kernel.org/doc/man-pages/."
227 #: build/C/man3/glob.3:34 build/C/man7/glob.7:26
233 #: build/C/man3/glob.3:34
239 #: build/C/man3/glob.3:37
240 msgid "glob, globfree - find pathnames matching a pattern, free memory from glob()"
244 #: build/C/man3/glob.3:40
246 msgid "B<#include E<lt>glob.hE<gt>>\n"
250 #: build/C/man3/glob.3:42
252 msgid "B<int glob(const char *>I<pattern>B<, int >I<flags>B<,>\n"
256 #: build/C/man3/glob.3:44
259 "B< int (*>I<errfunc>B<) (const char *>I<epath>B<, int "
264 #: build/C/man3/glob.3:46
266 msgid "B< glob_t *>I<pglob>B<);>\n"
270 #: build/C/man3/glob.3:48
272 msgid "B<void globfree(glob_t *>I<pglob>B<);>\n"
276 #: build/C/man3/glob.3:59
278 "The B<glob>() function searches for all the pathnames matching I<pattern> "
279 "according to the rules used by the shell (see B<glob>(7)). No tilde "
280 "expansion or parameter substitution is done; if you want these, use "
285 #: build/C/man3/glob.3:65
287 "The B<globfree>() function frees the dynamically allocated storage from an "
288 "earlier call to B<glob>()."
292 #: build/C/man3/glob.3:76
294 "The results of a B<glob>() call are stored in the structure pointed to by "
295 "I<pglob>. This structure is of type I<glob_t> (declared in "
296 "I<E<lt>glob.hE<gt>>) and includes the following elements defined by POSIX.2 "
297 "(more may be present as an extension):"
301 #: build/C/man3/glob.3:85
305 " size_t gl_pathc; /* Count of paths matched so far */\n"
306 " char **gl_pathv; /* List of matched pathnames. */\n"
307 " size_t gl_offs; /* Slots to reserve in I<gl_pathv>. */\n"
312 #: build/C/man3/glob.3:89
313 msgid "Results are stored in dynamically allocated storage."
317 #: build/C/man3/glob.3:95
319 "The argument I<flags> is made up of the bitwise OR of zero or more the "
320 "following symbolic constants, which modify the behavior of B<glob>():"
324 #: build/C/man3/glob.3:95
330 #: build/C/man3/glob.3:103
332 "Return upon a read error (because a directory does not have read permission, "
333 "for example). By default, B<glob>() attempts carry on despite errors, "
334 "reading all of the directories that it can."
338 #: build/C/man3/glob.3:103
344 #: build/C/man3/glob.3:106
345 msgid "Append a slash to each path which corresponds to a directory."
349 #: build/C/man3/glob.3:106
351 msgid "B<GLOB_NOSORT>"
355 #: build/C/man3/glob.3:111
357 "Don't sort the returned pathnames. The only reason to do this is to save "
358 "processing time. By default, the returned pathnames are sorted."
362 #: build/C/man3/glob.3:111
364 msgid "B<GLOB_DOOFFS>"
368 #: build/C/man3/glob.3:118
370 "Reserve I<pglob-E<gt>gl_offs> slots at the beginning of the list of strings "
371 "in I<pglob-E<gt>pathv>. The reserved slots contain NULL pointers."
375 #: build/C/man3/glob.3:118
377 msgid "B<GLOB_NOCHECK>"
381 #: build/C/man3/glob.3:126
383 "If no pattern matches, return the original pattern. By default, B<glob>() "
384 "returns B<GLOB_NOMATCH> if there are no matches."
388 #: build/C/man3/glob.3:126
390 msgid "B<GLOB_APPEND>"
394 #: build/C/man3/glob.3:133
396 "Append the results of this call to the vector of results returned by a "
397 "previous call to B<glob>(). Do not set this flag on the first invocation of "
402 #: build/C/man3/glob.3:133
404 msgid "B<GLOB_NOESCAPE>"
408 #: build/C/man3/glob.3:140
410 "Don't allow backslash (\\(aq\\e\\(aq) to be used as an escape character. "
411 "Normally, a backslash can be used to quote the following character, "
412 "providing a mechanism to turn off the special meaning metacharacters."
416 #: build/C/man3/glob.3:144
418 "I<flags> may also include any of the following, which are GNU extensions and "
419 "not defined by POSIX.2:"
423 #: build/C/man3/glob.3:144
425 msgid "B<GLOB_PERIOD>"
429 #: build/C/man3/glob.3:148
431 "Allow a leading period to be matched by metacharacters. By default, "
432 "metacharacters can't match a leading period."
436 #: build/C/man3/glob.3:148
438 msgid "B<GLOB_ALTDIRFUNC>"
442 #: build/C/man3/glob.3:158
444 "Use alternative functions I<pglob-E<gt>gl_closedir>, "
445 "I<pglob-E<gt>gl_readdir>, I<pglob-E<gt>gl_opendir>, I<pglob-E<gt>gl_lstat>, "
446 "and I<pglob-E<gt>gl_stat> for file system access instead of the normal "
451 #: build/C/man3/glob.3:158
453 msgid "B<GLOB_BRACE>"
457 #: build/C/man3/glob.3:173
459 "Expand B<csh>(1) style brace expressions of the form B<{a,b}>. Brace "
460 "expressions can be nested. Thus, for example, specifying the pattern "
461 "\"{foo/{,cat,dog},bar}\" would return the same results as four separate "
462 "B<glob>() calls using the strings: \"foo/\", \"foo/cat\", \"foo/dog\", and "
467 #: build/C/man3/glob.3:173
469 msgid "B<GLOB_NOMAGIC>"
473 #: build/C/man3/glob.3:178
475 "If the pattern contains no metacharacters then it should be returned as the "
476 "sole matching word, even if there is no file with that name."
480 #: build/C/man3/glob.3:178
482 msgid "B<GLOB_TILDE>"
486 #: build/C/man3/glob.3:190
488 "Carry out tilde expansion. If a tilde (\\(aq~\\(aq) is the only character "
489 "in the pattern, or an initial tilde is followed immediately by a slash "
490 "(\\(aq/\\(aq), then the home directory of the caller is substituted for the "
491 "tilde. If an initial tilde is followed by a username (e.g., "
492 "\"~andrea/bin\"), then the tilde and username are substituted by the home "
493 "directory of that user. If the username is invalid, or the home directory "
494 "cannot be determined, then no substitution is performed."
498 #: build/C/man3/glob.3:190
500 msgid "B<GLOB_TILDE_CHECK>"
504 #: build/C/man3/glob.3:201
506 "This provides behavior similar to that of B<GLOB_TILDE>. The difference is "
507 "that if the username is invalid, or the home directory cannot be determined, "
508 "then instead of using the pattern itself as the name, B<glob>() returns "
509 "B<GLOB_NOMATCH> to indicate an error."
513 #: build/C/man3/glob.3:201
515 msgid "B<GLOB_ONLYDIR>"
519 #: build/C/man3/glob.3:214
521 "This is a I<hint> to B<glob>() that the caller is interested only in "
522 "directories that match the pattern. If the implementation can easily "
523 "determine file-type information, then nondirectory files are not returned to "
524 "the caller. However, the caller must still check that returned files are "
525 "directories. (The purpose of this flag is merely to optimize performance "
526 "when the caller is interested only in directories.)"
530 #: build/C/man3/glob.3:237
532 "If I<errfunc> is not NULL, it will be called in case of an error with the "
533 "arguments I<epath>, a pointer to the path which failed, and I<eerrno>, the "
534 "value of I<errno> as returned from one of the calls to B<opendir>(3), "
535 "B<readdir>(3), or B<stat>(2). If I<errfunc> returns nonzero, or if "
536 "B<GLOB_ERR> is set, B<glob>() will terminate after the call to I<errfunc>."
540 #: build/C/man3/glob.3:244
542 "Upon successful return, I<pglob-E<gt>gl_pathc> contains the number of "
543 "matched pathnames and I<pglob-E<gt>gl_pathv> contains a pointer to the list "
544 "of pointers to matched pathnames. The list of pointers is terminated by a "
549 #: build/C/man3/glob.3:253
551 "It is possible to call B<glob>() several times. In that case, the "
552 "B<GLOB_APPEND> flag has to be set in I<flags> on the second and later "
557 #: build/C/man3/glob.3:259
559 "As a GNU extension, I<pglob-E<gt>gl_flags> is set to the flags specified, "
560 "B<or>ed with B<GLOB_MAGCHAR> if any metacharacters were found."
564 #: build/C/man3/glob.3:264
566 "On successful completion, B<glob>() returns zero. Other possible returns "
571 #: build/C/man3/glob.3:264
573 msgid "B<GLOB_NOSPACE>"
577 #: build/C/man3/glob.3:267
578 msgid "for running out of memory,"
582 #: build/C/man3/glob.3:267
584 msgid "B<GLOB_ABORTED>"
588 #: build/C/man3/glob.3:270
589 msgid "for a read error, and"
593 #: build/C/man3/glob.3:270
595 msgid "B<GLOB_NOMATCH>"
599 #: build/C/man3/glob.3:273
600 msgid "for no found matches."
604 #: build/C/man3/glob.3:275
605 msgid "POSIX.2, POSIX.1-2001."
609 #: build/C/man3/glob.3:275 build/C/man7/glob.7:142 build/C/man3/re_comp.3:68
615 #: build/C/man3/glob.3:286
617 "The structure elements I<gl_pathc> and I<gl_offs> are declared as I<size_t> "
618 "in glibc 2.1, as they should be according to POSIX.2, but are declared as "
619 "I<int> in libc4, libc5 and glibc 2.0."
623 #: build/C/man3/glob.3:286 build/C/man7/regex.7:259
629 #: build/C/man3/glob.3:295
631 "The B<glob>() function may fail due to failure of underlying function "
632 "calls, such as B<malloc>(3) or B<opendir>(3). These will store their error "
637 #: build/C/man3/glob.3:295 build/C/man3/wordexp.3:189
643 #: build/C/man3/glob.3:297
644 msgid "One example of use is the following code, which simulates typing"
648 #: build/C/man3/glob.3:300
649 msgid "ls -l *.c ../*.c"
653 #: build/C/man3/glob.3:303
654 msgid "in the shell:"
658 #: build/C/man3/glob.3:307
660 msgid "glob_t globbuf;\n"
664 #: build/C/man3/glob.3:314
667 "globbuf.gl_offs = 2;\n"
668 "glob(\"*.c\", GLOB_DOOFFS, NULL, &globbuf);\n"
669 "glob(\"../*.c\", GLOB_DOOFFS | GLOB_APPEND, NULL, &globbuf);\n"
670 "globbuf.gl_pathv[0] = \"ls\";\n"
671 "globbuf.gl_pathv[1] = \"-l\";\n"
672 "execvp(\"ls\", &globbuf.gl_pathv[0]);\n"
676 #: build/C/man3/glob.3:327
678 "B<ls>(1), B<sh>(1), B<stat>(2), B<exec>(3), B<fnmatch>(3), B<malloc>(3), "
679 "B<opendir>(3), B<readdir>(3), B<wordexp>(3), B<glob>(7)"
683 #: build/C/man7/glob.7:26
689 #: build/C/man7/glob.7:26
695 #: build/C/man7/glob.7:29
696 msgid "glob - globbing pathnames"
700 #: build/C/man7/glob.7:34
702 "Long ago, in UNIX V6, there was a program I</etc/glob> that would expand "
703 "wildcard patterns. Soon afterward this became a shell built-in."
707 #: build/C/man7/glob.7:38
709 "These days there is also a library routine B<glob>(3) that will perform "
710 "this function for a user program."
714 #: build/C/man7/glob.7:40
715 msgid "The rules are as follows (POSIX.2, 3.13)."
719 #: build/C/man7/glob.7:40
721 msgid "Wildcard matching"
725 #: build/C/man7/glob.7:47
727 "A string is a wildcard pattern if it contains one of the characters "
728 "\\(aq?\\(aq, \\(aq*\\(aq or \\(aq[\\(aq. Globbing is the operation that "
729 "expands a wildcard pattern into the list of pathnames matching the pattern. "
730 "Matching is defined by:"
734 #: build/C/man7/glob.7:49
735 msgid "A \\(aq?\\(aq (not between brackets) matches any single character."
739 #: build/C/man7/glob.7:52
741 "A \\(aq*\\(aq (not between brackets) matches any string, including the empty "
746 #: build/C/man7/glob.7:54
747 msgid "B<Character classes>"
751 #: build/C/man7/glob.7:63
753 "An expression \"I<[...]>\" where the first character after the leading "
754 "\\(aq[\\(aq is not an \\(aq!\\(aq matches a single character, namely any of "
755 "the characters enclosed by the brackets. The string enclosed by the "
756 "brackets cannot be empty; therefore \\(aq]\\(aq can be allowed between the "
757 "brackets, provided that it is the first character. (Thus, \"I<[][!]>\" "
758 "matches the three characters \\(aq[\\(aq, \\(aq]\\(aq and \\(aq!\\(aq.)"
762 #: build/C/man7/glob.7:65
767 #: build/C/man7/glob.7:76
769 "There is one special convention: two characters separated by \\(aq-\\(aq "
770 "denote a range. (Thus, \"I<[A-Fa-f0-9]>\" is equivalent to "
771 "\"I<[ABCDEFabcdef0123456789]>\".) One may include \\(aq-\\(aq in its "
772 "literal meaning by making it the first or last character between the "
773 "brackets. (Thus, \"I<[]-]>\" matches just the two characters \\(aq]\\(aq "
774 "and \\(aq-\\(aq, and \"I<[--0]>\" matches the three characters \\(aq-\\(aq, "
775 "\\(aq.\\(aq, \\(aq0\\(aq, since \\(aq/\\(aq cannot be matched.)"
779 #: build/C/man7/glob.7:78
780 msgid "B<Complementation>"
784 #: build/C/man7/glob.7:84
786 "An expression \"I<[!...]>\" matches a single character, namely any character "
787 "that is not matched by the expression obtained by removing the first "
788 "\\(aq!\\(aq from it. (Thus, \"I<[!]a-]>\" matches any single character "
789 "except \\(aq]\\(aq, \\(aqa\\(aq and \\(aq-\\(aq.)"
793 #: build/C/man7/glob.7:91
795 "One can remove the special meaning of \\(aq?\\(aq, \\(aq*\\(aq and "
796 "\\(aq[\\(aq by preceding them by a backslash, or, in case this is part of a "
797 "shell command line, enclosing them in quotes. Between brackets these "
798 "characters stand for themselves. Thus, \"I<[[?*\\e]>\" matches the four "
799 "characters \\(aq[\\(aq, \\(aq?\\(aq, \\(aq*\\(aq and \\(aq\\e\\(aq."
803 #: build/C/man7/glob.7:91
809 #: build/C/man7/glob.7:98
811 "Globbing is applied on each of the components of a pathname separately. A "
812 "\\(aq/\\(aq in a pathname cannot be matched by a \\(aq?\\(aq or \\(aq*\\(aq "
813 "wildcard, or by a range like \"I<[.-0]>\". A range cannot contain an "
814 "explicit \\(aq/\\(aq character; this would lead to a syntax error."
818 #: build/C/man7/glob.7:103
820 "If a filename starts with a \\(aq.\\(aq, this character must be matched "
821 "explicitly. (Thus, I<rm\\ *> will not remove .profile, and I<tar\\ c\\ *> "
822 "will not archive all your files; I<tar\\ c\\ .> is better.)"
826 #: build/C/man7/glob.7:103
832 #: build/C/man7/glob.7:109
834 "The nice and simple rule given above: \"expand a wildcard pattern into the "
835 "list of matching pathnames\" was the original UNIX definition. It allowed "
836 "one to have patterns that expand into an empty list, as in"
840 #: build/C/man7/glob.7:112
842 msgid " xv -wait 0 *.gif *.jpg\n"
846 #: build/C/man7/glob.7:122
848 "where perhaps no *.gif files are present (and this is not an error). "
849 "However, POSIX requires that a wildcard pattern is left unchanged when it is "
850 "syntactically incorrect, or the list of matching pathnames is empty. With "
851 "I<bash> one can force the classical behavior using this command:"
854 #. In Bash v1, by setting allow_null_glob_expansion=true
856 #: build/C/man7/glob.7:125
858 msgid " shopt -s nullglob\n"
862 #: build/C/man7/glob.7:128
863 msgid "(Similar problems occur elsewhere. E.g., where old scripts have"
867 #: build/C/man7/glob.7:131
869 msgid " rm \\`find . -name \"*~\"\\`\n"
873 #: build/C/man7/glob.7:134
874 msgid "new scripts require"
878 #: build/C/man7/glob.7:137
880 msgid " rm -f nosuchfile \\`find . -name \"*~\"\\`\n"
884 #: build/C/man7/glob.7:142
885 msgid "to avoid error messages from I<rm> called with an empty argument list.)"
889 #: build/C/man7/glob.7:143
891 msgid "Regular expressions"
895 #: build/C/man7/glob.7:150
897 "Note that wildcard patterns are not regular expressions, although they are a "
898 "bit similar. First of all, they match filenames, rather than text, and "
899 "secondly, the conventions are not the same: for example, in a regular "
900 "expression \\(aq*\\(aq means zero or more copies of the preceding thing."
904 #: build/C/man7/glob.7:154
906 "Now that regular expressions have bracket expressions where the negation is "
907 "indicated by a \\(aq^\\(aq, POSIX has declared the effect of a wildcard "
908 "pattern \"I<[^...]>\" to be undefined."
912 #: build/C/man7/glob.7:154
914 msgid "Character classes and internationalization"
918 #: build/C/man7/glob.7:172
920 "Of course ranges were originally meant to be ASCII ranges, so that \"I<[\\ "
921 "-%]>\" stands for \"I<[\\ !\"#$%]>\" and \"I<[a-z]>\" stands for \"any "
922 "lowercase letter\". Some UNIX implementations generalized this so that a "
923 "range X-Y stands for the set of characters with code between the codes for X "
924 "and for Y. However, this requires the user to know the character coding in "
925 "use on the local system, and moreover, is not convenient if the collating "
926 "sequence for the local alphabet differs from the ordering of the character "
927 "codes. Therefore, POSIX extended the bracket notation greatly, both for "
928 "wildcard patterns and for regular expressions. In the above we saw three "
929 "types of items that can occur in a bracket expression: namely (i) the "
930 "negation, (ii) explicit single characters, and (iii) ranges. POSIX "
931 "specifies ranges in an internationally more useful way and adds three more "
936 #: build/C/man7/glob.7:178
938 "(iii) Ranges X-Y comprise all characters that fall between X and Y "
939 "(inclusive) in the current collating sequence as defined by the "
940 "B<LC_COLLATE> category in the current locale."
944 #: build/C/man7/glob.7:180
945 msgid "(iv) Named character classes, like"
949 #: build/C/man7/glob.7:185
952 "[:alnum:] [:alpha:] [:blank:] [:cntrl:]\n"
953 "[:digit:] [:graph:] [:lower:] [:print:]\n"
954 "[:punct:] [:space:] [:upper:] [:xdigit:]\n"
958 #: build/C/man7/glob.7:194
960 "so that one can say \"I<[[:lower:]]>\" instead of \"I<[a-z]>\", and have "
961 "things work in Denmark, too, where there are three letters past \\(aqz\\(aq "
962 "in the alphabet. These character classes are defined by the B<LC_CTYPE> "
963 "category in the current locale."
967 #: build/C/man7/glob.7:200
969 "(v) Collating symbols, like \"I<[.ch.]>\" or \"I<[.a-acute.]>\", where the "
970 "string between \"I<[.>\" and \"I<.]>\" is a collating element defined for "
971 "the current locale. Note that this may be a multicharacter element."
975 #: build/C/man7/glob.7:208
977 "(vi) Equivalence class expressions, like \"I<[=a=]>\", where the string "
978 "between \"I<[=>\" and \"I<=]>\" is any collating element from its "
979 "equivalence class, as defined for the current locale. For example, "
980 "\"I<[[=a=]]>\" might be equivalent to \"I<[a\\('a\\(`a\\(:a\\(^a]>\", that "
981 "is, to \"I<[a[.a-acute.][.a-grave.][.a-umlaut.][.a-circumflex.]]>\"."
985 #: build/C/man7/glob.7:214
986 msgid "B<sh>(1), B<fnmatch>(3), B<glob>(3), B<locale>(7), B<regex>(7)"
990 #: build/C/man3/re_comp.3:27
996 #: build/C/man3/re_comp.3:27
1002 #: build/C/man3/re_comp.3:30
1003 msgid "re_comp, re_exec - BSD regex functions"
1007 #: build/C/man3/re_comp.3:32
1008 msgid "B<#define _REGEX_RE_COMP>"
1012 #: build/C/man3/re_comp.3:34
1013 msgid "B<#include E<lt>sys/types.hE<gt>>"
1017 #: build/C/man3/re_comp.3:36
1018 msgid "B<#include E<lt>regex.hE<gt>>"
1022 #: build/C/man3/re_comp.3:38
1023 msgid "B<char *re_comp(char *>I<regex>B<);>"
1027 #: build/C/man3/re_comp.3:40
1028 msgid "B<int re_exec(char *>I<string>B<);>"
1032 #: build/C/man3/re_comp.3:52
1034 "B<re_comp>() is used to compile the null-terminated regular expression "
1035 "pointed to by I<regex>. The compiled pattern occupies a static area, the "
1036 "pattern buffer, which is overwritten by subsequent use of B<re_comp>(). If "
1037 "I<regex> is NULL, no operation is performed and the pattern buffer's "
1038 "contents are not altered."
1042 #: build/C/man3/re_comp.3:58
1044 "B<re_exec>() is used to assess whether the null-terminated string pointed "
1045 "to by I<string> matches the previously compiled I<regex>."
1049 #: build/C/man3/re_comp.3:63
1051 "B<re_comp>() returns NULL on successful compilation of I<regex> otherwise "
1052 "it returns a pointer to an appropriate error message."
1056 #: build/C/man3/re_comp.3:66
1057 msgid "B<re_exec>() returns 1 for a successful match, zero for failure."
1061 #: build/C/man3/re_comp.3:68
1066 #: build/C/man3/re_comp.3:72
1068 "These functions are obsolete; the functions documented in B<regcomp>(3) "
1069 "should be used instead."
1073 #: build/C/man3/re_comp.3:76
1074 msgid "B<regcomp>(3), B<regex>(7), GNU regex manual"
1078 #: build/C/man3/regex.3:34 build/C/man7/regex.7:37
1084 #: build/C/man3/regex.3:34
1090 #: build/C/man3/regex.3:37
1091 msgid "regcomp, regexec, regerror, regfree - POSIX regex functions"
1095 #: build/C/man3/regex.3:41
1098 "B<#include E<lt>sys/types.hE<gt>>\n"
1099 "B<#include E<lt>regex.hE<gt>>\n"
1103 #: build/C/man3/regex.3:43
1106 "B<int regcomp(regex_t *>I<preg>B<, const char *>I<regex>B<, int "
1111 #: build/C/man3/regex.3:47
1114 "B<int regexec(const regex_t *>I<preg>B<, const char *>I<string>B<, size_t "
1116 "B< regmatch_t >I<pmatch[]>B<, int >I<eflags>B<);>\n"
1120 #: build/C/man3/regex.3:50
1123 "B<size_t regerror(int >I<errcode>B<, const regex_t *>I<preg>B<, char "
1125 "B< size_t >I<errbuf_size>B<);>\n"
1129 #: build/C/man3/regex.3:52
1131 msgid "B<void regfree(regex_t *>I<preg>B<);>\n"
1135 #: build/C/man3/regex.3:54
1137 msgid "POSIX regex compiling"
1141 #: build/C/man3/regex.3:60
1143 "B<regcomp>() is used to compile a regular expression into a form that is "
1144 "suitable for subsequent B<regexec>() searches."
1148 #: build/C/man3/regex.3:69
1150 "B<regcomp>() is supplied with I<preg>, a pointer to a pattern buffer "
1151 "storage area; I<regex>, a pointer to the null-terminated string and "
1152 "I<cflags>, flags used to determine the type of compilation."
1156 #: build/C/man3/regex.3:76
1158 "All regular expression searching must be done via a compiled pattern buffer, "
1159 "thus B<regexec>() must always be supplied with the address of a "
1160 "B<regcomp>() initialized pattern buffer."
1164 #: build/C/man3/regex.3:81
1165 msgid "I<cflags> may be the bitwise-B<or> of one or more of the following:"
1169 #: build/C/man3/regex.3:81
1171 msgid "B<REG_EXTENDED>"
1175 #: build/C/man3/regex.3:90
1177 "Use B<POSIX> Extended Regular Expression syntax when interpreting I<regex>. "
1178 "If not set, B<POSIX> Basic Regular Expression syntax is used."
1182 #: build/C/man3/regex.3:90
1184 msgid "B<REG_ICASE>"
1188 #: build/C/man3/regex.3:96
1190 "Do not differentiate case. Subsequent B<regexec>() searches using this "
1191 "pattern buffer will be case insensitive."
1195 #: build/C/man3/regex.3:96
1197 msgid "B<REG_NOSUB>"
1201 #: build/C/man3/regex.3:106
1203 "Do not report position of matches. The I<nmatch> and I<pmatch> arguments to "
1204 "B<regexec>() are ignored if the pattern buffer supplied was compiled with "
1209 #: build/C/man3/regex.3:106
1211 msgid "B<REG_NEWLINE>"
1215 #: build/C/man3/regex.3:109
1216 msgid "Match-any-character operators don't match a newline."
1220 #: build/C/man3/regex.3:113
1222 "A nonmatching list (B<[^...]>) not containing a newline does not match a "
1227 #: build/C/man3/regex.3:123
1229 "Match-beginning-of-line operator (B<^>) matches the empty string "
1230 "immediately after a newline, regardless of whether I<eflags>, the execution "
1231 "flags of B<regexec>(), contains B<REG_NOTBOL>."
1235 #: build/C/man3/regex.3:131
1237 "Match-end-of-line operator (B<$>) matches the empty string immediately "
1238 "before a newline, regardless of whether I<eflags> contains B<REG_NOTEOL>."
1242 #: build/C/man3/regex.3:131
1244 msgid "POSIX regex matching"
1248 #: build/C/man3/regex.3:148
1250 "B<regexec>() is used to match a null-terminated string against the "
1251 "precompiled pattern buffer, I<preg>. I<nmatch> and I<pmatch> are used to "
1252 "provide information regarding the location of any matches. I<eflags> may be "
1253 "the bitwise-B<or> of one or both of B<REG_NOTBOL> and B<REG_NOTEOL> which "
1254 "cause changes in matching behavior described below."
1258 #: build/C/man3/regex.3:148
1260 msgid "B<REG_NOTBOL>"
1264 #: build/C/man3/regex.3:158
1266 "The match-beginning-of-line operator always fails to match (but see the "
1267 "compilation flag B<REG_NEWLINE> above) This flag may be used when different "
1268 "portions of a string are passed to B<regexec>() and the beginning of the "
1269 "string should not be interpreted as the beginning of the line."
1273 #: build/C/man3/regex.3:158
1275 msgid "B<REG_NOTEOL>"
1279 #: build/C/man3/regex.3:164
1281 "The match-end-of-line operator always fails to match (but see the "
1282 "compilation flag B<REG_NEWLINE> above)"
1286 #: build/C/man3/regex.3:164
1288 msgid "Byte offsets"
1292 #: build/C/man3/regex.3:189
1294 "Unless B<REG_NOSUB> was set for the compilation of the pattern buffer, it is "
1295 "possible to obtain match addressing information. I<pmatch> must be "
1296 "dimensioned to have at least I<nmatch> elements. These are filled in by "
1297 "B<regexec>() with substring match addresses. The offsets of the "
1298 "subexpression starting at the I<i>th open parenthesis are stored in "
1299 "I<pmatch[i]>. The entire regular expression's match addresses are stored in "
1300 "I<pmatch[0]>. (Note that to return the offsets of I<N> subexpression "
1301 "matches, I<nmatch> must be at least I<N+1>.) Any unused structure elements "
1302 "will contain the value -1."
1306 #: build/C/man3/regex.3:196
1308 "The I<regmatch_t> structure which is the type of I<pmatch> is defined in "
1309 "I<E<lt>regex.hE<gt>>."
1313 #: build/C/man3/regex.3:203
1316 "typedef struct {\n"
1317 " regoff_t rm_so;\n"
1318 " regoff_t rm_eo;\n"
1323 #: build/C/man3/regex.3:214
1325 "Each I<rm_so> element that is not -1 indicates the start offset of the next "
1326 "largest substring match within the string. The relative I<rm_eo> element "
1327 "indicates the end offset of the match, which is the offset of the first "
1328 "character after the matching text."
1332 #: build/C/man3/regex.3:214
1334 msgid "POSIX error reporting"
1338 #: build/C/man3/regex.3:221
1340 "B<regerror>() is used to turn the error codes that can be returned by both "
1341 "B<regcomp>() and B<regexec>() into error message strings."
1345 #: build/C/man3/regex.3:243
1347 "B<regerror>() is passed the error code, I<errcode>, the pattern buffer, "
1348 "I<preg>, a pointer to a character string buffer, I<errbuf>, and the size of "
1349 "the string buffer, I<errbuf_size>. It returns the size of the I<errbuf> "
1350 "required to contain the null-terminated error message string. If both "
1351 "I<errbuf> and I<errbuf_size> are nonzero, I<errbuf> is filled in with the "
1352 "first I<errbuf_size - 1> characters of the error message and a terminating "
1353 "null byte (\\(aq\\e0\\(aq)."
1357 #: build/C/man3/regex.3:243
1359 msgid "POSIX pattern buffer freeing"
1363 #: build/C/man3/regex.3:251
1365 "Supplying B<regfree>() with a precompiled pattern buffer, I<preg> will free "
1366 "the memory allocated to the pattern buffer by the compiling process, "
1371 #: build/C/man3/regex.3:254
1373 "B<regcomp>() returns zero for a successful compilation or an error code for "
1378 #: build/C/man3/regex.3:259
1380 "B<regexec>() returns zero for a successful match or B<REG_NOMATCH> for "
1385 #: build/C/man3/regex.3:259
1391 #: build/C/man3/regex.3:262
1392 msgid "The following errors can be returned by B<regcomp>():"
1396 #: build/C/man3/regex.3:262
1398 msgid "B<REG_BADBR>"
1402 #: build/C/man3/regex.3:265
1403 msgid "Invalid use of back reference operator."
1407 #: build/C/man3/regex.3:265
1409 msgid "B<REG_BADPAT>"
1413 #: build/C/man3/regex.3:268
1414 msgid "Invalid use of pattern operators such as group or list."
1418 #: build/C/man3/regex.3:268
1420 msgid "B<REG_BADRPT>"
1424 #: build/C/man3/regex.3:272
1426 "Invalid use of repetition operators such as using \\(aq*\\(aq as the first "
1431 #: build/C/man3/regex.3:272
1433 msgid "B<REG_EBRACE>"
1437 #: build/C/man3/regex.3:275
1438 msgid "Un-matched brace interval operators."
1442 #: build/C/man3/regex.3:275
1444 msgid "B<REG_EBRACK>"
1448 #: build/C/man3/regex.3:278
1449 msgid "Un-matched bracket list operators."
1453 #: build/C/man3/regex.3:278
1455 msgid "B<REG_ECOLLATE>"
1459 #: build/C/man3/regex.3:281
1460 msgid "Invalid collating element."
1464 #: build/C/man3/regex.3:281
1466 msgid "B<REG_ECTYPE>"
1470 #: build/C/man3/regex.3:284
1471 msgid "Unknown character class name."
1475 #: build/C/man3/regex.3:284
1481 #: build/C/man3/regex.3:288
1482 msgid "Nonspecific error. This is not defined by POSIX.2."
1486 #: build/C/man3/regex.3:288
1488 msgid "B<REG_EESCAPE>"
1492 #: build/C/man3/regex.3:291
1493 msgid "Trailing backslash."
1497 #: build/C/man3/regex.3:291
1499 msgid "B<REG_EPAREN>"
1503 #: build/C/man3/regex.3:294
1504 msgid "Un-matched parenthesis group operators."
1508 #: build/C/man3/regex.3:294
1510 msgid "B<REG_ERANGE>"
1514 #: build/C/man3/regex.3:298
1516 "Invalid use of the range operator, e.g., the ending point of the range "
1517 "occurs prior to the starting point."
1521 #: build/C/man3/regex.3:298
1523 msgid "B<REG_ESIZE>"
1527 #: build/C/man3/regex.3:302
1529 "Compiled regular expression requires a pattern buffer larger than 64Kb. "
1530 "This is not defined by POSIX.2."
1534 #: build/C/man3/regex.3:302
1536 msgid "B<REG_ESPACE>"
1540 #: build/C/man3/regex.3:305
1541 msgid "The regex routines ran out of memory."
1545 #: build/C/man3/regex.3:305
1547 msgid "B<REG_ESUBREG>"
1551 #: build/C/man3/regex.3:308
1552 msgid "Invalid back reference to a subexpression."
1556 #: build/C/man3/regex.3:310 build/C/man3/wordexp.3:189
1557 msgid "POSIX.1-2001."
1561 #: build/C/man3/regex.3:313
1562 msgid "B<grep>(1), B<regex>(7)"
1566 #: build/C/man3/regex.3:316
1567 msgid "The glibc manual section, I<Regular Expression Matching>"
1571 #: build/C/man7/regex.7:37
1577 #: build/C/man7/regex.7:40
1578 msgid "regex - POSIX.2 regular expressions"
1582 #: build/C/man7/regex.7:54
1584 "Regular expressions (\"RE\"s), as defined in POSIX.2, come in two forms: "
1585 "modern REs (roughly those of I<egrep>; POSIX.2 calls these \"extended\" REs) "
1586 "and obsolete REs (roughly those of B<ed>(1); POSIX.2 \"basic\" REs). "
1587 "Obsolete REs mostly exist for backward compatibility in some old programs; "
1588 "they will be discussed at the end. POSIX.2 leaves some aspects of RE syntax "
1589 "and semantics open; \"\\*(dg\" marks decisions on these aspects that may not "
1590 "be fully portable to other POSIX.2 implementations."
1594 #: build/C/man7/regex.7:58
1596 "A (modern) RE is one\\*(dg or more nonempty\\*(dg I<branches>, separated by "
1597 "\\(aq|\\(aq. It matches anything that matches one of the branches."
1601 #: build/C/man7/regex.7:61
1603 "A branch is one\\*(dg or more I<pieces>, concatenated. It matches a match "
1604 "for the first, followed by a match for the second, etc."
1608 #: build/C/man7/regex.7:70
1610 "A piece is an I<atom> possibly followed by a single\\*(dg \\(aq*\\(aq, "
1611 "\\(aq+\\(aq, \\(aq?\\(aq, or I<bound>. An atom followed by \\(aq*\\(aq "
1612 "matches a sequence of 0 or more matches of the atom. An atom followed by "
1613 "\\(aq+\\(aq matches a sequence of 1 or more matches of the atom. An atom "
1614 "followed by \\(aq?\\(aq matches a sequence of 0 or 1 matches of the atom."
1618 #: build/C/man7/regex.7:88
1620 "A I<bound> is \\(aq{\\(aq followed by an unsigned decimal integer, possibly "
1621 "followed by \\(aq,\\(aq possibly followed by another unsigned decimal "
1622 "integer, always followed by \\(aq}\\(aq. The integers must lie between 0 "
1623 "and B<RE_DUP_MAX> (255\\*(dg) inclusive, and if there are two of them, the "
1624 "first may not exceed the second. An atom followed by a bound containing one "
1625 "integer I<i> and no comma matches a sequence of exactly I<i> matches of the "
1626 "atom. An atom followed by a bound containing one integer I<i> and a comma "
1627 "matches a sequence of I<i> or more matches of the atom. An atom followed by "
1628 "a bound containing two integers I<i> and I<j> matches a sequence of I<i> "
1629 "through I<j> (inclusive) matches of the atom."
1633 #: build/C/man7/regex.7:105
1635 "An atom is a regular expression enclosed in \"I<()>\" (matching a match for "
1636 "the regular expression), an empty set of \"I<()>\" (matching the null "
1637 "string)\\*(dg, a I<bracket expression> (see below), \\(aq.\\(aq (matching "
1638 "any single character), \\(aq^\\(aq (matching the null string at the "
1639 "beginning of a line), \\(aq$\\(aq (matching the null string at the end of a "
1640 "line), a \\(aq\\e\\(aq followed by one of the characters "
1641 "\"I<^.[$()|*+?{\\e>\" (matching that character taken as an ordinary "
1642 "character), a \\(aq\\e\\(aq followed by any other character\\*(dg (matching "
1643 "that character taken as an ordinary character, as if the \\(aq\\e\\(aq had "
1644 "not been present\\*(dg), or a single character with no other significance "
1645 "(matching that character). A \\(aq{\\(aq followed by a character other than "
1646 "a digit is an ordinary character, not the beginning of a bound\\*(dg. It is "
1647 "illegal to end an RE with \\(aq\\e\\(aq."
1651 #: build/C/man7/regex.7:119
1653 "A I<bracket expression> is a list of characters enclosed in \"I<[]>\". It "
1654 "normally matches any single character from the list (but see below). If the "
1655 "list begins with \\(aq^\\(aq, it matches any single character (but see "
1656 "below) I<not> from the rest of the list. If two characters in the list are "
1657 "separated by \\(aq-\\(aq, this is shorthand for the full I<range> of "
1658 "characters between those two (inclusive) in the collating sequence, for "
1659 "example, \"I<[0-9]>\" in ASCII matches any decimal digit. It is "
1660 "illegal\\*(dg for two ranges to share an endpoint, for example, "
1661 "\"I<a-c-e>\". Ranges are very collating-sequence-dependent, and portable "
1662 "programs should avoid relying on them."
1666 #: build/C/man7/regex.7:130
1668 "To include a literal \\(aq]\\(aq in the list, make it the first character "
1669 "(following a possible \\(aq^\\(aq). To include a literal \\(aq-\\(aq, make "
1670 "it the first or last character, or the second endpoint of a range. To use a "
1671 "literal \\(aq-\\(aq as the first endpoint of a range, enclose it in "
1672 "\"I<[.>\" and \"I<.]>\" to make it a collating element (see below). With "
1673 "the exception of these and some combinations using \\(aq[\\(aq (see next "
1674 "paragraphs), all other special characters, including \\(aq\\e\\(aq, lose "
1675 "their special significance within a bracket expression."
1679 #: build/C/man7/regex.7:142
1681 "Within a bracket expression, a collating element (a character, a "
1682 "multicharacter sequence that collates as if it were a single character, or a "
1683 "collating-sequence name for either) enclosed in \"I<[.>\" and \"I<.]>\" "
1684 "stands for the sequence of characters of that collating element. The "
1685 "sequence is a single element of the bracket expression's list. A bracket "
1686 "expression containing a multicharacter collating element can thus match more "
1687 "than one character, for example, if the collating sequence includes a \"ch\" "
1688 "collating element, then the RE \"I<[[.ch.]]*c>\" matches the first five "
1689 "characters of \"chchcc\"."
1693 #: build/C/man7/regex.7:154
1695 "Within a bracket expression, a collating element enclosed in \"I<[=>\" and "
1696 "\"I<=]>\" is an equivalence class, standing for the sequences of characters "
1697 "of all collating elements equivalent to that one, including itself. (If "
1698 "there are no other equivalent collating elements, the treatment is as if the "
1699 "enclosing delimiters were \"I<[.>\" and \"I<.]>\".) For example, if o and "
1700 "\\o'o^' are the members of an equivalence class, then \"I<[[=o=]]>\", "
1701 "\"I<[[=\\o'o^'=]]>\", and \"I<[o\\o'o^']>\" are all synonymous. An "
1702 "equivalence class may not\\*(dg be an endpoint of a range."
1706 #: build/C/man7/regex.7:160
1708 "Within a bracket expression, the name of a I<character class> enclosed in "
1709 "\"I<[:>\" and \"I<:]>\" stands for the list of all characters belonging to "
1710 "that class. Standard character class names are:"
1714 #: build/C/man7/regex.7:163
1720 #: build/C/man7/regex.7:168
1723 "alnum\tdigit\tpunct\n"
1724 "alpha\tgraph\tspace\n"
1725 "blank\tlower\tupper\n"
1726 "cntrl\tprint\txdigit\n"
1729 #. As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295666
1730 #. The following does not seem to apply in the glibc implementation
1732 #. There are two special cases\*(dg of bracket expressions:
1733 #. the bracket expressions "\fI[[:<:]]\fP" and "\fI[[:>:]]\fP" match
1734 #. the null string at the beginning and end of a word respectively.
1735 #. A word is defined as a sequence of
1737 #. which is neither preceded nor followed by
1739 #. A word character is an
1741 #. character (as defined by
1743 #. or an underscore.
1744 #. This is an extension,
1745 #. compatible with but not specified by POSIX.2,
1746 #. and should be used with
1747 #. caution in software intended to be portable to other systems.
1749 #: build/C/man7/regex.7:194
1751 "These stand for the character classes defined in B<wctype>(3). A locale may "
1752 "provide others. A character class may not be used as an endpoint of a "
1757 #: build/C/man7/regex.7:206
1759 "In the event that an RE could match more than one substring of a given "
1760 "string, the RE matches the one starting earliest in the string. If the RE "
1761 "could match more than one substring starting at that point, it matches the "
1762 "longest. Subexpressions also match the longest possible substrings, subject "
1763 "to the constraint that the whole match be as long as possible, with "
1764 "subexpressions starting earlier in the RE taking priority over ones starting "
1765 "later. Note that higher-level subexpressions thus take priority over their "
1766 "lower-level component subexpressions."
1770 #: build/C/man7/regex.7:218
1772 "Match lengths are measured in characters, not collating elements. A null "
1773 "string is considered longer than no match at all. For example, \"I<bb*>\" "
1774 "matches the three middle characters of \"abbbc\", "
1775 "\"I<(wee|week)(knights|nights)>\" matches all ten characters of "
1776 "\"weeknights\", when \"I<(.*).*>\" is matched against \"abc\" the "
1777 "parenthesized subexpression matches all three characters, and when "
1778 "\"I<(a*)*>\" is matched against \"bc\" both the whole RE and the "
1779 "parenthesized subexpression match the null string."
1783 #: build/C/man7/regex.7:229
1785 "If case-independent matching is specified, the effect is much as if all case "
1786 "distinctions had vanished from the alphabet. When an alphabetic that exists "
1787 "in multiple cases appears as an ordinary character outside a bracket "
1788 "expression, it is effectively transformed into a bracket expression "
1789 "containing both cases, for example, \\(aqx\\(aq becomes \"I<[xX]>\". When "
1790 "it appears inside a bracket expression, all case counterparts of it are "
1791 "added to the bracket expression, so that, for example, \"I<[x]>\" becomes "
1792 "\"I<[xX]>\" and \"I<[^x]>\" becomes \"I<[^xX]>\"."
1796 #: build/C/man7/regex.7:235
1798 "No particular limit is imposed on the length of REs\\*(dg. Programs "
1799 "intended to be portable should not employ REs longer than 256 bytes, as an "
1800 "implementation can refuse to accept such REs and remain POSIX-compliant."
1804 #: build/C/man7/regex.7:251
1806 "Obsolete (\"basic\") regular expressions differ in several respects. "
1807 "\\(aq|\\(aq, \\(aq+\\(aq, and \\(aq?\\(aq are ordinary characters and there "
1808 "is no equivalent for their functionality. The delimiters for bounds are "
1809 "\"I<\\e{>\" and \"I<\\e}>\", with \\(aq{\\(aq and \\(aq}\\(aq by themselves "
1810 "ordinary characters. The parentheses for nested subexpressions are "
1811 "\"I<\\e(>\" and \"I<\\e)>\", with \\(aq(\\(aq and \\(aq)\\(aq by themselves "
1812 "ordinary characters. \\(aq^\\(aq is an ordinary character except at the "
1813 "beginning of the RE or\\*(dg the beginning of a parenthesized subexpression, "
1814 "\\(aq$\\(aq is an ordinary character except at the end of the RE or\\*(dg "
1815 "the end of a parenthesized subexpression, and \\(aq*\\(aq is an ordinary "
1816 "character if it appears at the beginning of the RE or the beginning of a "
1817 "parenthesized subexpression (after a possible leading \\(aq^\\(aq)."
1821 #: build/C/man7/regex.7:259
1823 "Finally, there is one new type of atom, a I<back reference>: \\(aq\\e\\(aq "
1824 "followed by a nonzero decimal digit I<d> matches the same sequence of "
1825 "characters matched by the I<d>th parenthesized subexpression (numbering "
1826 "subexpressions by the positions of their opening parentheses, left to "
1827 "right), so that, for example, \"I<\\e([bc]\\e)\\e1>\" matches \"bb\" or "
1828 "\"cc\" but not \"bc\"."
1832 #: build/C/man7/regex.7:261
1833 msgid "Having two kinds of REs is a botch."
1837 #: build/C/man7/regex.7:267
1839 "The current POSIX.2 spec says that \\(aq)\\(aq is an ordinary character in "
1840 "the absence of an unmatched \\(aq(\\(aq; this was an unintentional result of "
1841 "a wording error, and change is likely. Avoid relying on it."
1845 #: build/C/man7/regex.7:274
1847 "Back references are a dreadful botch, posing major problems for efficient "
1848 "implementations. They are also somewhat vaguely defined (does "
1849 "\"I<a\\e(\\e(b\\e)*\\e2\\e)*d>\" match \"abbbd\"?). Avoid using them."
1852 #. As per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=295666
1853 #. The following does not seem to apply in the glibc implementation
1855 #. The syntax for word boundaries is incredibly ugly.
1857 #: build/C/man7/regex.7:282
1859 "POSIX.2's specification of case-independent matching is vague. The \"one "
1860 "case implies all cases\" definition given above is current consensus among "
1861 "implementors as to the right interpretation."
1865 #: build/C/man7/regex.7:282
1870 #. Sigh... The page license means we must have the author's name
1871 #. in the formatted output.
1873 #: build/C/man7/regex.7:286
1874 msgid "This page was taken from Henry Spencer's regex package."
1878 #: build/C/man7/regex.7:289
1879 msgid "B<grep>(1), B<regex>(3)"
1883 #: build/C/man7/regex.7:291
1884 msgid "POSIX.2, section 2.8 (Regular Expression Notation)."
1888 #: build/C/man3/wordexp.3:24
1894 #: build/C/man3/wordexp.3:24
1900 #: build/C/man3/wordexp.3:27
1901 msgid "wordexp, wordfree - perform word expansion like a posix-shell"
1905 #: build/C/man3/wordexp.3:29
1906 msgid "B<#include E<lt>wordexp.hE<gt>>"
1910 #: build/C/man3/wordexp.3:31
1911 msgid "B<int wordexp(const char *>I<s>B<, wordexp_t *>I<p>B<, int >I<flags>B<);>"
1915 #: build/C/man3/wordexp.3:33
1916 msgid "B<void wordfree(wordexp_t *>I<p>B<);>"
1920 #: build/C/man3/wordexp.3:37
1921 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
1925 #: build/C/man3/wordexp.3:42
1926 msgid "B<wordexp>(), B<wordfree>(): _XOPEN_SOURCE"
1930 #: build/C/man3/wordexp.3:76
1932 "The function B<wordexp>() performs a shell-like expansion of the string "
1933 "I<s> and returns the result in the structure pointed to by I<p>. The data "
1934 "type I<wordexp_t> is a structure that at least has the fields I<we_wordc>, "
1935 "I<we_wordv>, and I<we_offs>. The field I<we_wordc> is a I<size_t> that "
1936 "gives the number of words in the expansion of I<s>. The field I<we_wordv> "
1937 "is a I<char **> that points to the array of words found. The field "
1938 "I<we_offs> of type I<size_t> is sometimes (depending on I<flags>, see below) "
1939 "used to indicate the number of initial elements in the I<we_wordv> array "
1940 "that should be filled with NULLs."
1944 #: build/C/man3/wordexp.3:84
1946 "The function B<wordfree>() frees the allocated memory again. More "
1947 "precisely, it does not free its argument, but it frees the array I<we_wordv> "
1948 "and the strings that points to."
1952 #: build/C/man3/wordexp.3:84
1954 msgid "The string argument"
1958 #: build/C/man3/wordexp.3:94
1960 "Since the expansion is the same as the expansion by the shell (see B<sh>(1)) "
1961 "of the parameters to a command, the string I<s> must not contain characters "
1962 "that would be illegal in shell command parameters. In particular, there "
1963 "must not be any unescaped newline or |, &, ;, E<lt>, E<gt>, (, ), {, } "
1964 "characters outside a command substitution or parameter substitution context."
1968 #: build/C/man3/wordexp.3:100
1970 "If the argument I<s> contains a word that starts with an unquoted comment "
1971 "character #, then it is unspecified whether that word and all following "
1972 "words are ignored, or the # is treated as a non-comment character."
1976 #: build/C/man3/wordexp.3:100
1978 msgid "The expansion"
1982 #: build/C/man3/wordexp.3:107
1984 "The expansion done consists of the following stages: tilde expansion "
1985 "(replacing ~user by user's home directory), variable substitution (replacing "
1986 "$FOO by the value of the environment variable FOO), command substitution "
1987 "(replacing $(command) or \\`command\\` by the output of command), arithmetic "
1988 "expansion, field splitting, wildcard expansion, quote removal."
1992 #: build/C/man3/wordexp.3:110
1994 "The result of expansion of special parameters ($@, $*, $#, $?, $-, $$, $!, "
1995 "$0) is unspecified."
1999 #: build/C/man3/wordexp.3:113
2001 "Field splitting is done using the environment variable $IFS. If it is not "
2002 "set, the field separators are space, tab and newline."
2006 #: build/C/man3/wordexp.3:113
2008 msgid "The output array"
2012 #: build/C/man3/wordexp.3:117
2013 msgid "The array I<we_wordv> contains the words found, followed by a NULL."
2017 #: build/C/man3/wordexp.3:117
2019 msgid "The flags argument"
2023 #: build/C/man3/wordexp.3:121
2024 msgid "The I<flag> argument is a bitwise inclusive OR of the following values:"
2028 #: build/C/man3/wordexp.3:121
2030 msgid "B<WRDE_APPEND>"
2034 #: build/C/man3/wordexp.3:124
2035 msgid "Append the words found to the array resulting from a previous call."
2039 #: build/C/man3/wordexp.3:124
2041 msgid "B<WRDE_DOOFFS>"
2045 #: build/C/man3/wordexp.3:132
2047 "Insert I<we_offs> initial NULLs in the array I<we_wordv>. (These are not "
2048 "counted in the returned I<we_wordc>.)"
2052 #: build/C/man3/wordexp.3:132
2054 msgid "B<WRDE_NOCMD>"
2058 #: build/C/man3/wordexp.3:135
2059 msgid "Don't do command substitution."
2063 #: build/C/man3/wordexp.3:135
2065 msgid "B<WRDE_REUSE>"
2069 #: build/C/man3/wordexp.3:145
2071 "The argument I<p> resulted from a previous call to B<wordexp>(), and "
2072 "B<wordfree>() was not called. Reuse the allocated storage."
2076 #: build/C/man3/wordexp.3:145
2078 msgid "B<WRDE_SHOWERR>"
2082 #: build/C/man3/wordexp.3:154
2084 "Normally during command substitution I<stderr> is redirected to "
2085 "I</dev/null>. This flag specifies that I<stderr> is not to be redirected."
2089 #: build/C/man3/wordexp.3:154
2091 msgid "B<WRDE_UNDEF>"
2095 #: build/C/man3/wordexp.3:157
2096 msgid "Consider it an error if an undefined shell variable is expanded."
2100 #: build/C/man3/wordexp.3:161
2102 "In case of success 0 is returned. In case of error one of the following "
2103 "five values is returned."
2107 #: build/C/man3/wordexp.3:161
2109 msgid "B<WRDE_BADCHAR>"
2113 #: build/C/man3/wordexp.3:164
2114 msgid "Illegal occurrence of newline or one of |, &, ;, E<lt>, E<gt>, (, ), {, }."
2118 #: build/C/man3/wordexp.3:164
2120 msgid "B<WRDE_BADVAL>"
2124 #: build/C/man3/wordexp.3:170
2126 "An undefined shell variable was referenced, and the B<WRDE_UNDEF> flag told "
2127 "us to consider this an error."
2131 #: build/C/man3/wordexp.3:170
2133 msgid "B<WRDE_CMDSUB>"
2137 #: build/C/man3/wordexp.3:175
2139 "Command substitution occurred, and the B<WRDE_NOCMD> flag told us to "
2140 "consider this an error."
2144 #: build/C/man3/wordexp.3:175
2146 msgid "B<WRDE_NOSPACE>"
2150 #: build/C/man3/wordexp.3:178
2151 msgid "Out of memory."
2155 #: build/C/man3/wordexp.3:178
2157 msgid "B<WRDE_SYNTAX>"
2161 #: build/C/man3/wordexp.3:182
2162 msgid "Shell syntax error, such as unbalanced parentheses or unmatched quotes."
2166 #: build/C/man3/wordexp.3:182
2172 #: build/C/man3/wordexp.3:187
2173 msgid "B<wordexp>() and B<wordfree>() are provided in glibc since version 2.1."
2177 #: build/C/man3/wordexp.3:192
2179 "The output of the following example program is approximately that of \"ls "
2184 #: build/C/man3/wordexp.3:197
2187 "#include E<lt>stdio.hE<gt>\n"
2188 "#include E<lt>stdlib.hE<gt>\n"
2189 "#include E<lt>wordexp.hE<gt>\n"
2193 #: build/C/man3/wordexp.3:204
2197 "main(int argc, char **argv)\n"
2205 #: build/C/man3/wordexp.3:212
2208 " wordexp(\"[a-c]*.c\", &p, 0);\n"
2209 " w = p.we_wordv;\n"
2210 " for (i = 0; i E<lt> p.we_wordc; i++)\n"
2211 " printf(\"%s\\en\", w[i]);\n"
2213 " exit(EXIT_SUCCESS);\n"
2218 #: build/C/man3/wordexp.3:216
2219 msgid "B<fnmatch>(3), B<glob>(3)"