+ 1
can anyone help me understand this line code?
import java.util.*; public class test { public static void main(String[] args) { System.out.println(validate("216.08.094.196")); System.out.println(validate("08.008.0008.00008")); System.out.println(validate("01.102.103.104")); } public static String validate(String ip) { //i am not getting reg ex return statement . explain plz. return ip.replaceAll("(?<=^|\\.)0+(?!\\.|$)",""); } }
1 Resposta
+ 3
I know that Solomoni Railoa, Ipang, Minho 🇰🇷, A͢J and Jayakrishna🇮🇳 are pretty nifty with java. Perhaps they can help.