i Have a string s "hello,sa n.txt"
but i want the string s ="hellosan.txt" no comma,no space, no semicolon,should be there How can i do this in java Using regular expression?
String input = "hello,sa n.txt";
String clean = input.replaceAll("[, ;]", ""); // replace any of ", ;" with "nothing"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With