Lines Matching refs:pattern
6 via the PCRE2 updated API to do its pattern matching. On Unix-like, Windows,
270 /* Structure for pattern and its compiled form; used for matching patterns and
290 /* Structure holding the two variables that describe a pattern chain. A pointer
362 { OP_PATLIST, 'e', &match_patdata, "regex(p)=pattern", "specify pattern (may be used more than once)" },
391 { OP_PATLIST, N_EXCLUDE,&exclude_patdata, "exclude=pattern","exclude matching files when recursing" },
392 { OP_PATLIST, N_INCLUDE,&include_patdata, "include=pattern","include matching files when recursing" },
393 { OP_PATLIST, N_EXCLUDE_DIR,&exclude_dir_patdata, "exclude-dir=pattern","exclude matching directories when recursing" },
394 { OP_PATLIST, N_INCLUDE_DIR,&include_dir_patdata, "include-dir=pattern","include matching directories when recursing" },
491 s pattern string to add
494 Returns: new pattern block or NULL on error
508 fprintf(stderr, "pcre2grep: pattern is too long (limit is %d bytes)\n",
729 char *pattern;
733 pattern = (char *)malloc(len + 3);
735 if ((pattern == NULL) || (dir == NULL))
740 memcpy(pattern, filename, len);
741 memcpy(&(pattern[len]), "\\*", 3);
742 dir->handle = FindFirstFile(pattern, &(dir->data));
745 free(pattern);
750 free(pattern);
891 fprintf(stderr, "] [long options] [pattern] [files]\n");
908 printf("Usage: pcre2grep [OPTION]... [PATTERN] [FILE1 FILE2 ...]" STDOUT_NL);
909 printf("Search for PATTERN in each FILE or standard input." STDOUT_NL);
910 printf("PATTERN must be present if neither -e nor -f is used." STDOUT_NL);
959 printf("The maximum size of any pattern is %d bytes." STDOUT_NL, MAXPATLEN);
971 /* If any exclude pattern matches, the path is excluded. Otherwise, unless
972 there are no includes, the path must match an include pattern.
1484 if (patterns->next != NULL) fprintf(stderr, "pattern number %d to ", i);
2088 /* If the pattern contained a lookbehind that included \K, it is
2251 and its line-ending characters (if they matched the pattern), so there
2747 * Compile a single pattern *
2750 /* Do nothing if the pattern has already been compiled. This is the case for
2753 When the -F option has been used, each "pattern" may be a list of strings,
2756 pattern chain.
2759 p points to the pattern block
2762 fromfile TRUE if the pattern was read from a file
2764 count 0 if this is the only command line pattern, or
2765 number of the command line pattern, or
2766 linenumber for a pattern from a file
2850 patptr pointer to the pattern chain anchor
2851 patlastptr pointer to the last pattern pointer
2890 "buffer" into the pattern chain. However, that pointer is used only when
2891 compiling the pattern, which happens immediately below, so we flatten it
2902 /* This loop is needed because compiling a "pattern" when -F is set may add
3440 the first argument is the one and only pattern, and it must exist. */
3450 pattern. We cannot do this until