gogoWebsite

java replace brackets '' or '(aa)'

Updated to 19 hours ago

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");