Reputation: 25
I am trying to split a String (that represents an IPv4 address) in painless. I tried the following:
String[] ipAddressParts = /\\./.split(params.ip);
But the String doesn't get split at all.
Upvotes: 1
Views: 2009
Reputation: 217424
You're almost there, the correct code is this one (you have one too many backslashes):
String[] ipAddressParts = /\./.split(params.ip);
Upvotes: 4