Hmm...My problem seem to come from the fact "^" matches not only beginning of the current line but beginning of any of the previous lines so instead of "^.*" I need to do "^[^\n]*". If that is not considered a bug than the documentation definitely needs updating...
Thanks, Andriy
