Introduction to Data - Multiple Choice Quiz (answers)"

Overview

Teaching: 0 min
Exercises: 0 min
Questions
  • What does Fr[ea]nc[eh] match?

Objectives
  • Test knowledge of use of regular expressions in searches

Exercise Answers

What does Fr[ea]nc[eh] match?

What does Fr[ea]nc[eh]$ match?

What would match the strings French and France only that appear at the beginning of a line?

How do you match the whole words colour and color (case insensitive)?

How would you find the whole-word headrest or head rest but not head rest (that is, with two spaces between head and rest?

How would you find a 4-letter word that ends a string and is preceded by at least one zero?

How do you match any 4-digit string anywhere?

How would you match the date format dd-MM-yyyy?

How would you match the date format dd-MM-yyyy or dd-MM-yy at the end of a line only?

How would you match publication formats such as British Library : London, 2015 and Manchester University Press: Manchester, 1999?

Multiple Choice Quiz Answers

Key Points

  • Regular expressions answer sheet