instruction
stringclasses
1 value
input
stringlengths
9
1.68k
output
stringlengths
1
453
Write the regular expression for the following requirement:
lines which contain a word using 2 or more letters
.*\b[A-Za-z]{2,}\b.*
Write the regular expression for the following requirement:
lines that contain 'er' at the end of every word.
~(.*((\b[A-Za-z]+\b)&(~(.*er))).*)
Write the regular expression for the following requirement:
lines using 4 instances of 'ug'
.*(.*ug.*){4}.*
Write the regular expression for the following requirement:
lines that do not have 'the' in them
~(.*the.*)
Write the regular expression for the following requirement:
lines containing at least one uppercase letter, and at least one lowercase letter
(.*[A-Z].*)&(.*[a-z].*)
Write the regular expression for the following requirement:
lines that contain the phrase 'Wednesday' but not 'Sunday'.
(.*Wednesday.*)&(~(.*Sunday.*))
Write the regular expression for the following requirement:
lines containing the word 'revolution'.
.*\brevolution\b.*
Write the regular expression for the following requirement:
lines ending with 'xyz'
.*xyz
Write the regular expression for the following requirement:
lines that contain a nine letter word.
.*\b[A-Za-z]{9}\b.*
Write the regular expression for the following requirement:
lines with fox that do not contain the word chicken.
(.*fox.*)&(~(.*\bchicken\b.*))
Write the regular expression for the following requirement:
lines utilizing words ending with 'fe'.
.*((\b[A-Za-z]+\b)&(.*fe)).*
Write the regular expression for the following requirement:
lines that do not have any word consisting of 4 letters.
~(.*\b[A-Za-z]{4}\b.*)
Write the regular expression for the following requirement:
lines which start with 'oocl'
oocl.*
Write the regular expression for the following requirement:
lines that do not contain numerical characters.
~(.*[0-9].*)
Write the regular expression for the following requirement:
lines using 'gophers' and containing the words 'grass' and 'seeds'.
(.*gophers.*)&(.*\bgrass\b.*)&(.*\bseeds\b.*)
Write the regular expression for the following requirement:
lines containing 'annou' and 'irth' that do not have a 'c' anywhere.
(.*annou.*)&(.*irth.*)&(~(.*c.*))
Write the regular expression for the following requirement:
lines using 'x' before 'z'
.*x.*z.*
Write the regular expression for the following requirement:
lines beginning with the letter 'f'
f.*
Write the regular expression for the following requirement:
4 letter lines
[A-Za-z]{4}
Write the regular expression for the following requirement:
lines using numbers that show two or more '0'.
.*(.*0.*){2,}.*