Search text using regular expressions Flashcards
What are the two forms of regular expression?
Basic and extended
Describe a bracket expression?
Any character in the square brackets is matched on
Describe a range expression?
Any character in the range of characters is the square brackets is matched on
What regex character represent any single character?
.
What regex character represents the start of a line?
What regex character represents the end of a line?
$
How are multiple possible strings defined?
|
What are used to separate subexpressions?
( )
What is the escape character?
\
What command will search files for a specified string?
grep
What command is the equivalent of grep -E (extended) ?
egrep
What command is the equivalent of grep -F (fixed strings) ?
fgrep
What type of grep would be best suited to search for user mark.reed?
fgrep - fixed
What type of grep would be best suited to search for a mix of possible matches?
egrep - extended
In which grep mode do the meta-characters ?, +, {, |, (, and ) lose their special meaning?
regular