The first case:
String str = "(nihao),(henhao),(nichilema?),(chiguole)";
Replace brackets with ~;
String str2 = ("[( )]", "~");
success!
The second case:
String str = "abc(a)cba";
Replace abc(a) with b;
String str2 = ("abc[( )]a[( )]","b");
The first case:
String str = "(nihao),(henhao),(nichilema?),(chiguole)";
Replace brackets with ~;
String str2 = ("[( )]", "~");
success!
The second case:
String str = "abc(a)cba";
Replace abc(a) with b;
String str2 = ("abc[( )]a[( )]","b");