IT 117: Intermediate Scripting
Class 12 Ungraded Quiz


  1. If you wanted to match the characters "ox" when they were not at the beginning of a string, what regular expression would you use?


  2. What meta-characters do you use to surround a part of a regular expression that you want to extract from the matched string?


  3. What method on a match object is used to extract the value of a string in a matched line using the meta-characters mentioned above?


  4. What does the $ in a regular expression mean?


  5. What does the | in a regular expression mean?


  6. What is a greedy match?


  7. What regular expression would you write if you wanted to match one occurence of either the character "x", or "y", or "z"?


  8. What regular expression would you write if you wanted to match a single lowercase character?


  9. What regular expression would you write if you wanted to match exactly 57 occurrences of the letter "X"


  10. What regular expression would you write if you wanted to match anywhere between 3 and 5 occurrences of the letter "q"?