String line = "Pritom K Mondal"; line = line.replaceAll("(?s).", "X"); Will output: XXXXXXXXXXXXXXX
(?s)
DOTALL
No comments:
Post a Comment