Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Remove punctuation except numbers, commas and spaces
//Title of this code //'main' method must be in a class 'Rextester'. import java.util.*; import java.lang.*; import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; class Rextester { public static void main(String args[]) { String strWithPunctuation = "P@ssw0rd!!!,1234"; System.out.println(strWithPunctuation.replaceAll("[\\p{Punct}&&[^0-9]&&[^,]]", "")); } }
run
|
edit
|
history
|
help
0
A.K.JAVA_EXPERIENCE_2
binary
exp5
2darray
project euler 12, java
Frequency
Relation
Coding Challenge - 01 (Even numbers)
assign
Counter.java