asd
What regular expression matches the longest instance of any unknown string?Just place the regular expression in there, do not place the delimiters in.
(.*)
In a regular expression a _ matches any unknown character.
(., dot, period)
Enter the regular expression that matches only 1 instance of a * . Please place your answer between the typical delimiters.
(/\*/)
Enter the regular expression that that finds the first line that ends with a . (dot)Include the delimiters.
(/\.$/, /^.*\.$/)
Enter the regular expression that will find the first line that begins with a '9' followed by a space then an a through z. please include the delimiters.
(/^9 [a-z]/)
Enter a regular expression that finds a line that starts with the string Thursday. Enter just a regular expression and it's delimiters, not a search statement etc.
(/^Thursday/)
Enter the regular expression that will find the first line that begins with a number. Include the delimiters.
(/^[0-9]/)
In a sed script, which of the following regular expressions matches zero or more occurences of any character at all?
.*
sed can use regular expressions for line matching or for substitute instructions.What is the regular expression symbol that matches any single character?
., dot
Regular expressions usually use delimiters to begin and end them. Normally a _____ is used to begin and end a regular expression.
/
Which regular expression matches exactly one instance of any letter of the alphabet?
/[a-zA-Z]/
What is the difference between a word and a string?
A word begins with a space or is the first string after a newline ending with a space or punctuation
In the below sedscript, what is the result? Choose the best answer.sedscript:s/^A.*//g
Deletes any line starting with an A
True or false:By default, if you supply the input data from a file on the file system like this:sed -f sed_script.sed original.txtIt will makes changes to the file "original.txt" directly in the file.
False
What does the following sed script do?/^Here/ i\Leroy was
It inserts the words 'Leroy was' before any line that begins with the word 'Here'
In regular expressions, the caret ^ is a special character.
True
The delimiter / is also a special character in a regular expression unless you escape it.
True
True or False:Unix/Linux utilities and regular expressions consider everything a character, even a space, with one exception which is the NEWLINE character.
True
In a regular expression inside of a character class definition, we use the _ character to specify NOT.
^
When using a regular expression in a sed script, the regular expression matches:
any line that has something in it that satisfies the pattern specified
What does the following regular expression in a sed script match?/\/$/
it matches any line that ends in a '/' character
In the below sedscript, what is the result? Choose the best answer.sedscript:2,5 d
it would delete exactly four lines of data starting at line 2
A regular expression always matches the _______ string possible.
longest
Which of the following sed commands:1. Uses the file "sed_script.sed" for instructions2. Uses the file "original.txt" for the original data3. Outputs the results to "processed.txt"Choose the most accurate choice.
sed -f sed_script.sed original.txt > processed.txt
Let's say you wrote a sed script called 'sed_script1' and you want to process the data in a file called 'original.txt' and redirect the output of the sed filter to a file called 'processed.txt'.1. The sed script is called 'sed_script1'2. The original data is 'original.txt'3. The output should be saved to 'processed.txt'What would the command line look like to tell sed to use sed_script1, process original.txt, and output the results to processed.txt?
sed -f sed_script1 original.txt > processed.txt, sed -f sed_script1 original.txt >> processed.txt, cat original.txt | sed -f sed_script1 >> processed.txt, cat original.txt | sed -f sed_script1 > processed.txt, sed -f sed_script1 original.txt >processed.txt, sed -f sed_script1 original.txt >>processed.txt
the regular expression /.*ing\./ would match what?
the beginning of the file to the last string ing.
By default a regular expression matches:
the longest string possible before a NEWLINE is found
Let's say you're writing a sed script that you want to output a particular line to a file on the file system.1. The file you want to write the line to is called 'outfile'2. You do not want to use redirection to write to the fileWhat sed command (not a shell command) would you give to sed to write the currently processed line to the file 'outfile'?
w outfile, w
What does the following regular expression match?/ .alk/
walk (a space followed by the string walk)