import java.util.regex.*; public class Regexp { public static void main(String []args) { String input = "- How are you today?\n - Fine! Thank you.\n - You 're welcome."; // βρες όλα τα σημεία στίξης !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ Pattern p = Pattern.compile("\\p{Punct}"); Matcher m = p.matcher(input); while(m.find()) { System.out.println("Found: "+input.substring(m.start(), m.end()) ); } } }