On Apr 6, 2005 4:58 PM, Warren Brown <warrenb / timevision.com> wrote: > Han, [ cut ] > > Because /^/ matches the beginning of a line (not the beginning of > the string), and /\s/ matches whitespace, which includes newlines (\n). > So the first place in the string where the beginning of a line is > followed by one or more whitespaces is at position 8. > Thanks for the reactions to all. It's not that simple: ^ _also_ matches the beginning of the string. Perl does _not_ produce a match, unless you suffix the regular expression with m. Cheers, Han