java tutorial - Java replaceAll() method - java programming - learn java - java basics - java for beginners
Description
Java replaceAll() method — replaces each substring of the given string that corresponds to the specified regular expression, with this substitution, in other words, the method allows you to replace the word in a string.
Syntax
Syntax method:
Options
Detailed information about the parameters:
- regex is a regular expression to which this string must match;
- replacement is a string that will replace the expression found.
Return value
- In Java, replaceAll () returns the result string.