in reply to Re^2: Greedy flip flop operator?
in thread Greedy flip flop operator?

/^[^+]/ will end at the first empty line (if they really are there as shown).. anyway you are right: I must not post before coffe

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^4: Greedy flip flop operator?
by LanX (Saint) on Apr 26, 2018 at 07:51 UTC
    > will end at the first empty line

    Really? Can't test at the moment but an empty line shouldn't match a character class cause it requires at least one character.

    Of course you could have whitespace characters, that's why I'd include \w+

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Wikisyntax for the Monastery