Remove square bracket from one string

0
hello   I have one string '[abc,xyz,mno]' and I've to remove square bracket from this string , how is it possible ..
asked
2 answers
1

You need to escape the brackets in the replaceAll function, because it will interpret the needle as a regular expression. So you can do:

replaceAll($yourString, '[\[\]]', '')

answered
2

Hi Abhishek,

you can use replaceAll() function:

 

' $currentObject/modifiedString = replaceAll('[', '', replaceAll(']', '', $currentObject/yourStringAttribute)) '

 

Let me know if you face any issues,

Hope it helps!!

answered