Indicate the proper regular expression to: \"Find all complete lines of a file w
ID: 3842645 • Letter: I
Question
Indicate the proper regular expression to: "Find all complete lines of a file which contain nothing but one ore more occurrences of the letter Z"
Z*
^Z*$
^ZZZZZ$
^Z+$
Indicate the proper regular expression to: "Find all complete lines of a file which contain a row consisting only the letter x but ignoring any leading or trailing space on the line"
^s(x*)s$
s*x+s*
^s*x+s*$
^s+x+s+$
Which regular expression, when applied to complete sentences, would match complete words that begin and end with the same letter, and only begin and end. (For example "algebra" matches but "amoebae" does not.)
(w)w+()
(w)w+(w)
^www$
s.*s
Every language supporting regular expressions uses the same standardized syntax.
True
False
All three of the languages we studied in the course of the semester have both Regular Expression processing capabilities either "built-in to" the language or have Regular expression processing available in a standard language library.
True
False
Z*
^Z*$
^ZZZZZ$
^Z+$
Indicate the proper regular expression to: "Find all complete lines of a file which contain a row consisting only the letter x but ignoring any leading or trailing space on the line"
^s(x*)s$
s*x+s*
^s*x+s*$
^s+x+s+$
Which regular expression, when applied to complete sentences, would match complete words that begin and end with the same letter, and only begin and end. (For example "algebra" matches but "amoebae" does not.)
(w)w+()
(w)w+(w)
^www$
s.*s
Every language supporting regular expressions uses the same standardized syntax.
True
False
All three of the languages we studied in the course of the semester have both Regular Expression processing capabilities either "built-in to" the language or have Regular expression processing available in a standard language library.
True
False
Explanation / Answer
Answer1) ^Z+$
Explanation:
In Z*, this means the string can start and end with any letter.
In ^Z*$, this means Zero or more Z letters.
In ^ZZZZZ$, this means only 5 Z's will occur.
Answer2) ^s*x+s*$
Explanation:
* means zero or more occurence.
+ means one or more occurence.
Answer3)(w)w+(w)
Explanation: This match complete words that begin and end with the same letter.
Answer4)True