From: Fleck Jean-Julien Date: 2009-12-27T18:07:30+09:00 Subject: Re: How to truncate the spaces in the front of a line Hello, > so strange... > /s should match all the spaces, including tabs,but it doesn't work. > I will try to use XML Parser. Well, it would be more useful if you used \s instead (wih a backslash and not a slash). Try with name = line.gsub(/^\s+/,"") By the way, all useful shortcuts in regexp start with a backslash and not a slash (usually reserved to delimit the regexp) Cheers, -- JJ Fleck PCSI1 Lycée Kléber