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

Connected

Exercise

Regular expressions

You are managing inventory for an electronics store, and you noticed that some product names have special characters. Regular expressions (regex) allow you to search text for patterns to remove these special characters. Develop a regex pattern to remove any characters that are not lower or upper case letters, or spaces.

Instructions

100 XP
  • Complete the regex pattern to exclude lower or upper case letters, and spaces.
  • Remove any character that is not a letter or space from messyProduct.