Lines Matching refs:pattern
275 * transform - Convert a shell style pattern to a regex
276 * @pattern: String to be converted
295 static int transform(const char *pattern, char **regex)
300 if (!pattern || !regex)
303 length = strlen(pattern);
309 for (i = 0; pattern[i]; i++) {
310 if ((pattern[i] == '*') || (pattern[i] == '.'))
322 for (i = 0, j = 1; pattern[i]; i++, j++) {
323 if (pattern[i] == '*') {
327 } else if (pattern[i] == '.') {
331 } else if (pattern[i] == '?') {
334 result[j] = pattern[i];
340 ntfs_log_debug("Pattern '%s' replaced with regex '%s'.\n", pattern,