Recently I handled this one in my project by using \\S it worked.. Sir can you make a video on how to handle or remove (no back space)from a string. I handled it but wanted to share with our folks.
Hi @Naveen what if we need to remove only extra spaces for e.g. string = "This is my new java code." Now between each string only one space is required. How we can achieve result as : "This is my new java code."
@@naveenautomationlabs Hi sir, What ever logic you put,it removes all spaces in a sentance but our question is need one space between words and remove extra spaces in between words in a sentance means, output should be "This is my new java code"..Please provide the answer sir
Hi Naveen. I am from electronics manufacturing background and having overall experience in QA. Can I get a job in software testing. And if yes then how.? Waiting for your valuable response.
Recently I handled this one in my project by using \\S it worked.. Sir can you make a video on how to handle or remove (no back space)from a string. I handled it but wanted to share with our folks.
Helpful 👍🏻😊
Thanks you so much Naveen. Can we use string tokenizer for removing the white spaces?
Hi @Naveen what if we need to remove only extra spaces for e.g. string = "This is my new java code." Now between each string only one space is required. How we can achieve result as : "This is my new java code."
String t = " This is my new java code";
System.out.println(t.replaceAll("\\s+", " ").trim());
@@naveenautomationlabs Hi sir, What ever logic you put,it removes all spaces in a sentance but our question is need one space between words and remove extra spaces in between words in a sentance means, output should be "This is my new java code"..Please provide the answer sir
One word amazing that's it.
Hi Naveen.
I am from electronics manufacturing background and having overall experience in QA. Can I get a job in software testing. And if yes then how.?
Waiting for your valuable response.
Hi do you have idea on duck creek technologies. If so can you please do video on it
Thank you sir
How can I remove space before dot...ex: Hello Java .(I want to remove space before dot...)..may I know sir
Thanx sir
Please do these in python also
String str = " Selenium is awesome ";
String[] strArry = str.split(" ");
for(int i = 0; i < strArry.length; i++) {
System.out.print(strArry[i]);
}
thanks man yours is easier