I have use the replaceAll() function in my Java ireport for one of the text field.
The following codes need to replace all the matche strings to $ sign or \ character . However, it is only work for replace() function only.
$P{name}.replaceAll('abc', '\$');
or
$P{name}.replaceAll('abc', '\\');