29. License plate validation

Considering license plates with the format LLL-LL DDD or LLL-LL DDDD (where L is an uppercase letter from A to Z and D is a digit), write:

  • One function that validates that a license plate number is of the correct format
  • One function that, given an input text, extracts and returns all the license plate numbers found in the text

Get The Modern C++ Challenge now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.