Convert Java Code To HTML
Paste your java source code below:
HTML Code
Output
//How to remove line separators in string package com.test; public class Test { public static void main(String[] args) { String s="testing new line \n and carriage return \r with regex"; System.out.println(s); String st=s.replaceAll("\\p{Cntrl}", ""); System.out.println(st); } }