- 1

How can i remove special symbols from string?

3rd Mar 2022, 10:08 AM
Š’Š»Š°Š“ ŠŸŠ°Ń€Ń…Š¾Š¼ŠµŃ†
Š’Š»Š°Š“ ŠŸŠ°Ń€Ń…Š¾Š¼ŠµŃ† - avatar
2 Answers
+ 7
With java public class RemoveSpecialCharacterExample1 { public static void main(String args[]) { String str= "This#string%contains^special*characters&."; str = str.replaceAll("[^a-zA-Z0-9]", " "); System.out.println(str); } }
4th Mar 2022, 4:57 AM
Vaibhav
Vaibhav - avatar
+ 3
There are ways to do this, and it varies by the programming language used. Add programming language(s) name in the tags to narrow down scope.
3rd Mar 2022, 10:11 AM
Ipang