Lines Matching refs:pattern
35 def grep(pattern, file):
40 returns 1 if the pattern is present in the file, 0 if not.
42 command = 'grep "%s" > /dev/null' % pattern
136 def file_contains_pattern(file, pattern):
137 """Return true if file contains the specified egrep pattern"""
140 return not utils.system('egrep -q "' + pattern + '" ' + file,
144 def list_grep(list, pattern):
145 """True if any item in list matches the specified pattern."""
146 compiled = re.compile(pattern)
728 # much like find . -name 'pattern'
729 def locate(pattern, root=os.getcwd()):
732 if fnmatch.fnmatch(f, pattern):
1016 Name itself is an egrep pattern, so it can use | etc for variations.
1798 pattern = re.compile('.*: (\d+)')
1800 matched = pattern.match(line)
1903 pattern = '%s=(.*)' % key
1904 pat = re.search(pattern, f.read())