clean Punctuation by Regex - Java java.util.regex

Java examples for java.util.regex:Match New Line

Description

clean Punctuation by Regex

Demo Code


//package com.java2s;

public class Main {

    public static String cleanPunctuation(String content) {
        return content.replaceAll("[\\p{P}?????]", content);
    }//from   w w w. j  ava 2  s. c  o  m
}

Related Tutorials