develooper Front page | | Postings from July 2002

Re: My solution annotated

Thread Previous
Lars Henrik Mathiesen
July 8, 2002 02:44
Re: My solution annotated
Message ID:
> Date: Mon, 8 Jul 2002 10:19:42 +0100 (BST)
> From: Stephen Turner <>
> # We want to find an earliest node to print. So look for lines finishing
> # " $b", but which don't start "$b ". These stop $b being an earliest
> # node at this point.
> #
> # (I wanted to save two strokes with /(?<!^$b) $b\n/ -- I don't know why
> # it doesn't work.)

It seems that /(?<!^...)/m doesn't fail to match at the start of the
buffer, only when ^ is after a newline. Probably a bug... I wanted to
use the construct too, and then ran out of time to make the solution
work with an alternative.

Lars Mathiesen (U of Copenhagen CS Dep) <> (Humour NOT marked)

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About