In BRE, these characters have a special meaning unless they are escaped with a backslash:
`^ $ . * [ ] \`
However, these characters do not have any special meaning unless they are escaped with a backslash:
`? + { } | ( )`
#### Extended Regular Expressions (ERE)
ERE gives all of these characters a special meaning unless they are escaped with a backslash:
`^ $ . * + ? [ ] ( ) | { }`
#### Perl Compatible Regular Expressions (PCRE)
PCRE has even more options such as additional anchors and character classes, lookahead/lookbehind, conditional expressions, comments, and more. See the [regexp cheatsheet](/regexp).
### Output Options
```bash
-c, --count # print the count of matching lines. suppresses normal output
--color[=WHEN] # applies color to the matches. WHEN is never, always, or auto
-m, --max-count=NUM # stop reading after max count is reached
-o, --only-matching # only print the matched part of a line
-q, --quiet, --silent
-s, --no-messages # suppress error messages about nonexistent or unreadable files
```
### Context Options
```bash
-B NUM, --before-context=NUM # print NUM lines before a match
-A NUM, --after-context=NUM # print NUM lines after a match
-C NUM, -NUM, --context=NUM # print NUM lines before and after a match