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
collectors and stream
JAVA regex for only allow numbers
Smallest Multiple of N with Zeros and Ones
Most Common Word
Basic LinkedList in Java
темп
2.7 intersection
4.b
merge sort by java
a+b