you need to import 2 libraries. a matcher library and pattern. the simply use the matcher method find()