- 1
How can i remove special symbols from string?
2 ответов
+ 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);
}
}
+ 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.