I want to convert all the special characters in a String to their full names.
Example:
Input: What is stack overflow?
Output: What is stack overflow question mark
I used replaceall() to do it, but is there any simpler way of doing it because I have to write one line for each special character?
text = text.replaceAll("\\.", " Fullstop ");
text = text.replaceAll("!", " Exclamation mark ");
text = text.replaceAll("\"", " Double quote ");
text = text.replaceAll("#", " Hashtag ");
...