1. Learn
  2. /
  3. Courses
  4. /
  5. Cleaning Data in Java

Connected

Exercise

Character matching

Your sales data sometimes contains typos or formatting errors that could break your analysis. Before calculating total revenue, you need to verify that all sales quantities contain only valid numeric characters and decimal points. You've extracted some sales quantities (in millions of units) from the video game dataset.

Instructions

100 XP
  • Check if quantity contains any digits (0 to 9).
  • Look for the decimal separator in quantity.
  • Detect any alphabetic characters in quantity (lowercase or uppercase).