How to replace a Text with a pipe character

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


How to replace a Text with a pipe character



I want to replace a String with a Pipe delimiter but it doesnt seem to work.


String tagData = "Name:Test,Code:312341,ID:4 |";
String s = "Name:sqeq,Code:34311,ID:5 |Name:qddas,Code:43134,ID:6 |Name:Test,Code:312341,ID:4 |";



i have tried:


s = s.replaceAll(tagData, "");
s = s.replace(tagData, "");
s = s.replaceFirst(tagData, "");



nothing of these Methods changed anything on my string.





s = s.replace(tagData, ""); works. What do you want?
– Mạnh Quyết Nguyễn
22 secs ago


s = s.replace(tagData, "");









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

Current 93