It works for me. Perhaps you overlooked something: newlines
$s = ''; # no newline.
$t = '\n'; # newline.
()+ would only match $s of course.
Though you might want to match on whitespace instead of a newline.
And don't forget checking if the newline is CR, LF, or CR+LF.
[color=#6600CC]Atropos[/color] | openvein.org