question: public static String identifyLineDelimiter ( String fileContent ) { if ( fileContent . matches ( "(?s).*(\\r\\n).*" ) ) { return "\r\n" ; } else if ( fileContent . matches ( "(?s).*(\\n).*" ) ) { return "\n" ; } else if ( fileContent . matches ( "(?s).*(\\r).*" ) ) { return "\r" ; } else { return "\n" ; } }
target:  Identify which line delimiter is used in a file