I have textfile with lines like:
stackoverflow (200) stack over flow
stack over flow (150) over flow
stack (15)
stackoverflow (50) something
and I need to delete everything after () to get
stackoverflow (200)
stack over flow (150)
stack (15)
stackoverflow (50)
I tried with
String string = new String(Files.readAllBytes(Paths.get("file.txt")));
String result = string.split("\\)")[0];
but it doesn't work