/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
String text
="Oh! my God, You are so FUNNY. I've made it simpler like 'Anything'. Are you happy now?"; String[] words
=getWords
(text
); for(int i=0;i<words.length;i++)
{
System.
out.
println('['+words
[i
]+']'); }
}
{
String[] words
=text.
split("\\s+|(?<=\\S)\\b|(?=\\p{P})"); return words;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN0cmluZyB0ZXh0PSJPaCEgbXkgR29kLCBZb3UgYXJlIHNvIEZVTk5ZLiBJJ3ZlIG1hZGUgaXQgc2ltcGxlciBsaWtlICdBbnl0aGluZycuIEFyZSB5b3UgaGFwcHkgbm93PyI7CiAgICAgICAgU3RyaW5nW10gd29yZHM9Z2V0V29yZHModGV4dCk7CiAgICAgICAgZm9yKGludCBpPTA7aTx3b3Jkcy5sZW5ndGg7aSsrKQogICAgICAgIHsKICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKCdbJyt3b3Jkc1tpXSsnXScpOwogICAgICAgIH0KfQpwdWJsaWMgc3RhdGljIFN0cmluZ1tdIGdldFdvcmRzKFN0cmluZyB0ZXh0KQp7CiAgICBTdHJpbmdbXSB3b3Jkcz10ZXh0LnNwbGl0KCJcXHMrfCg/PD1cXFMpXFxifCg/PVxccHtQfSkiKTsKICAgIHJldHVybiB3b3JkczsKCgl9Cn0=