Hello Jesse,

> I assume the solution would probably involve getting the number of
> spaces for the first line and removing that number of spaces from each
> line in the block?

You are also assuming your text is consistently indented from the
first line, that is you don't have

....line 1
..line 2
....line 3

for example. A better way would be (I think) to check first each line
to search for the minimum number of spaces and then remove that number
of spaces from each line (assuming also that you have normal spaces
and no tabulations for example). One way would be

string =3D "    line1\n  line2\n    line3"
puts string
arr =3D string.split(/\n/)
nb =3D arr.collect {|line| line =3D~ /^( *)/ ; $1.length}.min
new_string =3D arr.collect {|line| line.sub(/ {#{nb}}/,'')}.join("\n")
puts new_string

Cheers,

--=20
JJ Fleck
PCSI1 Lyc=E9e Kl=E9ber