Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

java replace first occurrence of substring

String payment = "10.20.30.40";
payment = payment.replaceFirst("[.]", ",");  // Replace the first dot (.) with coma (,)
System.out.println(payment);  // 10,20.30.40
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #replace #occurrence #substring
ADD COMMENT
Topic
Name
4+9 =