Finally, to include a literal - place it last. The period . The preceding item is optional and matched at most once. The preceding item will be matched zero or more times. The preceding item is matched exactly n times.
Repetition takes precedence over concatenation, which in turn takes precedence over alternation.
A whole subexpression may be enclosed in parentheses to override these precedence rules. Normally, exit status is 0 if matches were found, and 1 if no matches were found. Exit status is 2 if there were syntax errors in the pattern, inaccessible input files, or other system errors. In addition, certain other obscure regular expressions require exponential time and space, and may cause grep to run out of memory. Backreferences are very slow, and may require exponential time.