fork(14) download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Ideone {
  5. public static void main (String[] args) {
  6. String str = "<Unable to fetch user info combination of dob=[20001231] and pan=[ABCD1234Z]>";
  7. str = str.replaceAll("(?=[^\\[]+]).", "*");
  8. System.out.println(str);
  9. }
  10. }
Success #stdin #stdout 0.04s 712192KB
stdin
Standard input is empty
stdout
<Unable to fetch user info combination of dob=[********] and pan=[*********]>