Removing Tabs in a String

Giizjetng

New Member
I need to format this \[code\]String\[/code\]:\[code\]"public class geo { public static void main(String[] args) { if (true) { System.out.print("Yes"); if (false) { System.out.prinln("DSadaDSa"); x = 4; blahblah(); } } }}"\[/code\]to get everything between:\[code\]"public class geo { public static void main(String[] args) { }}"\[/code\]So in this example the String I want to get is:\[code\]"if (true) { System.out.print("Yes"); if (false) { System.out.prinln("DSadaDSa"); x = 4; blahblah(); }}"\[/code\]Currently I am doing it a bit of a messy way by replacing the char sequences I don't want with empty Strings, but the \[code\]String\[/code\] I am left with at the end\[code\] "if (true) { System.out.print("Yes"); if (false) { System.out.prinln("DSadaDSa"); x = 4; blahblah(); } }"\[/code\]still has the leading tabs on each line.Is there an easy way to remove these tabs so the \[code\]String\[/code\] is effectively shifted over to the left by one tabs width?
 
Back
Top