重松です。こんにちは。
> が、しかし
> list($head,$body)=split("^(\n|\r\n|\r?){2}$",$line);
> これで、head bodyに別れてくれません。
うっ、試してないのがバレバレですね。;)
手元の apache 様が何故か cound not start とのたまうので、
テストは ruby でしました。
a = "1\n2\n\n3\n4"
x = a.split(/\n{2}|\r{2}|(\r\n){2}/)
y = a.split(/^$/)
p x
p y
["1\n2", "3\n4"]
["1\n2\n", "\n3\n4"]
とまあ、こんな感じですね。
--
Osamu Shigematsu <m5issige@mr.hitachi-medical.co.jp>