Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
/* Hello World in Groovy */
//String text ="FROM LIFE OF LOAN:ANA1";
//String text ="FROM LIFE OF LOAN:ANA1 2020 23sd";
//String text=" 2010 PTP FASTPAY 1339.30 040 9" ;
String text = "FROM LIFE OF LOAN: LOAN MODIFIED EFFECTIVE 06/01/2010 PYMT; TERM=367 "
REGEX_TO_ADD_SPACE_AFTER_SPECIAL_CHARACTER = ':'
println(text.replaceAll(REGEX_TO_ADD_SPACE_AFTER_SPECIAL_CHARACTER,'\$0 ').trim())
Advertisements
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.
AcceptLearn more