Which method is used to replace a pattern in a string?search()replace()match()split()PreviousSave & Next
Question
Which method is used to replace a pattern in a string?search()replace()match()split()PreviousSave & Next
Solution
The method used to replace a pattern in a string is replace().
Similar Questions
Which method is used to search for a match in a string?exec()test()compile()split()PreviousSave & Next
correct String method to replace the word
Which method is used to compile a regular expression?exec()test()compile()split()PreviousSave & Next
Java String class provides a lot of methods to perform operations on strings such as compare(), concat(), equals(), split(), length(), replace() .
Which method is used to find a substring within a string in C++?find()substr()search()locate()
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.