From: "Jesse B." Date: 2010-03-30T11:41:06+09:00 Subject: return number of spaces at the beginning of a line How would I find the number of spaces at the beginning of a line before the occurrance of the first non-space character? Would the best method be to use a regular expression that covers all non-space characters and get the index of the first occurrance of that? -- Posted via http://www.ruby-forum.com/.