replaceFirst()
Replaces the first occurrence of old in the current String with new.
Syntax
String replaceFirst(String old, String new)
- old is the original string.
- new is the string that replaces old.
Usage
Backslashes (\) and dollar signs ($) in the replacement string may cause the results to be different than if it were being treated as a literal replacement string.