How to remove all grammar from a string in Java -
hello trying edit code in order remove grammar. hope in order make can input string area.
public static void main(string[] args) { // string list string foxes = "the,quick,brown,fox,jumped,over,the,lazy,dog."; system.out.println(" here string unedited" + foxes); string lowercase = foxes.tolowercase(); system.out.println(" here string (no caps): " + lowercase);
please let me know code should use in order make code remove grammar. thank in advance. :)
see http://www.tutorialspoint.com/java/java_string_replaceall.htm
you want remove punctuation string. easiest way use regular expression find punctuation , replace matches nothing.
string nopunctuation = foxes.replaceall("[\.,:;'\"!\?]", "");
simply include each symbol want replaced inside regular expression set , don't forget escape special characters!
Comments
Post a Comment