[Solved] Split Email:passrwords to list of emails and list of passwords [duplicate]
You can use split to first split at all linebreaks, then to split each line at the :. Of course you might run into trouble if the password contains a :, but that is a different task. String text = textArea.getText(); String[] lines = text.split(“\r?\n”); List<String> users = new ArrayList<>(lines.length); List<String> passwords = new ArrayList<>(lines.length); … Read more