how to replace "(double quotes) in a string with \" in java | How do I retrieve query parameters in a Spring Boot controller? | Storing a new object as the value of a hashmap?
Tutorial by Er Satya
Please login to like this article.
str = str.replace(, ) Avoid using
replaceAllsince it uses regex syntax in description of what to replace and how to replace, which means that
\will have to be escaped in string
"\\"but also in regex
\\(needs to be written as
"\\\\"string) which means that we would need to use.
str = str.replaceAll(, );
str = str.replaceAll(, Matcher.quoteReplacement( ))
How do I retrieve query parameters in a Spring Boot controller?
More articles from same author:
Recent lost & found:
Login for enhanced experience
Create and manage your profile
Publish any lost and found belongings
Connect with the authors & add your review comments
Discover your area of interest
Art & entertainment
Astrology & spirituality
Medical & fitness
Real life stories
Story & poetry
Top in search
More recent categories
Affiliate Marketing (Public)
Tech Blogger | Java | Spring Boot | HTML | CSS | MySQL(Public)
Real life stories(Public)