Is it possible to replaceall on a string using wildcards? For example
string adder;
adder = '[Test | 123 ! xyz]';
string replaced;
replaced = adder.replaceall('|%!','');
System.AssertEquals(replaced,'Test xyz');
Here I am using % as wildcard but it is not working.