my_string.replaceAll("\\p{C}", "?");
See more about Unicode regex. java.util.regexPattern
/String.replaceAll
supports them.
More Related Contents:
- How can I iterate through the unicode codepoints of a Java String?
- Creating Unicode character from its number
- Easy way to remove accents from a Unicode string? [duplicate]
- Can a valid Unicode string contain FFFF? Is Java/CharacterIterator broken?
- How to properly trim whitespaces from a string in Java?
- How to replace � in a string
- How to determine if a String contains invalid encoded characters
- How to correctly compute the length of a String in Java?
- How do I read / convert an InputStream into a String in Java?
- Immutability of Strings in Java
- Why can’t I use switch statement on a String?
- Java: convert List to a join()d String
- What are all the escape characters?
- What is the Java’s internal represention for String? Modified UTF-8? UTF-16?
- Bytes of a string in Java
- How can I format a String number to have commas and round?
- Test if a string contains any of the strings from an array
- The most sophisticated way for creating comma-separated Strings from a Collection/Array/List?
- How much memory does a string use in Java 8?
- How to replace a String in java which contains dot?
- String concatenation complexity in C++ and Java [duplicate]
- Validate a file name on Windows
- The split() method in Java does not work on a dot (.) [duplicate]
- How to prevent java.lang.String.split() from creating a leading empty string?
- How do I apply the for-each loop to every character in a String?
- How to replace first occurrence of string in Java
- Difference between String#equals and String#contentEquals methods
- Java: Get last element after split
- In Java, how to append a string more efficiently? [duplicate]
- Replacing single ‘\’ with ‘\\’ in Java