How to replace 1st four spaces ONLY in each line w/ nothing?
Posted: Tue Jan 21, 2014 9:16 pm
I have some java source code that is indented with spaces. But before EVERY line, there are four additional spaces (this is the format required by stackoverflow, in order to post code, so it actually displays like code).
I am trying to eliminate those first four spaces with "^[FOURSPACES]" --> "", but it's making that replacement repeatedly on every line, which is eliminating too many spaces.
It should result in this
but actually results in this
Does anyone know how to do this replacement only once per line? Thank you for helping me.
Code: Select all
/**
<P>A function.</P>
**/
public void myFunction() {
for(...) {
...
}It should result in this
Code: Select all
/**
<P>A function.</P>
**/
public void myFunction() {
for(...) {
...
}Code: Select all
/**
<P>A function.</P>
**/
public void myFunction() {
for(...) {
...
}