I have to replace double semicolon (;;) in a string with single comma(,) in an apex class. Can someone help me?
1 Answer
You can use the replaceAll() method from the String class.
String testString = 'Hello;; my name is SF support.'; testString = testString.replaceAll(';;', ','); System.debug(testString); Result: Hello, my name is SF support.