Welcome to the Ranch! Please
UseCodeTags (<- read) when posting your code. I have added them for you this time.
As per your question, the first thing you did wrong is the line 19 of your code - you are trying to compare two object references, both of which are of
String type. Since these are not the same, you are always getting
false as a result, hence the output you get.
However, the approach is still wrong, even if the above wouldn't be a problem. I would recommend you read
Regular Expressions tutorial to get an idea on how to use them. As a hint, for your problem you would probably need to check
String#replaceAll() method.