I am working on an exercise in JAVA 1.8 that goes like this.
I have a String : "Able was I, ere I saw Elba."
I need to remove spaces and punctuation and capitalize it all.
Then I need to save a copy of it in reverse order and compare the two to see if they are the same.
Does anyone have a suggestion on how they might achieve this ?
I was thinking along the lines of a regex /[a-zA-Z]+/g as a possibility. But I don't know how to extract the words using a RegEx.
The result of the extraction would have the above expression returned as "ABLEWASIEREISAWELBA" .
Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.