I wanted to take a string such as
[item.a.1234] is very close to [item.a.2345]
and print out only the "item" to the screen...how might I do that.
So far I have:
import java.io.*;
public class Solution {
public static void main(String args[] ) throws Exception {
InputStreamReader istream = new InputStreamReader(System.in);
BufferedReader bReader = new BufferedReader(istream);
String output = bReader.readLine();
while (output != null){
System.out.println(output);
output = bReader.readLine();
}
}
}
But this gives me:
[item.a.1234] is very close to [item.a.2345]
I want:
item.a.1234,item.a.2345
without the word in between the "Items"...any suggestions?