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, set off with the proper meta-characters, in a matched line?


  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 occurrence 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"?