seperate string into newlines by character code example Example: split by new line java String lines[] = string.split("\\r?\\n");