I have the following string and I would like to replace all the spaces and commas in this string with some characters.
Please see the example below:
Expected output string:
12345, 234567 3456789
-c 12345 -xyz\r\n-c 234567 -xyz\r\n-c 3456789 -xyz
how can I do it in Java?