in reply to Beautiful .. operator

take everything between /start/ and /end/ which is not inside other /start/ .. /end/ block

That would be
start b f j end
but I get
start b start c d e end start g h i end

Replies are listed 'Best First'.
Re^2: Beautiful .. operator
by grizzley (Chaplain) on Oct 28, 2008 at 21:48 UTC
    Sorry, my mistake. Original if(/start/ .. (/end/ && !(/start/../end/))) replaced with if(/start/ .. (!(/start/../end/) && /end/)) And description changed to: take everything between /start/ and (/end/ which is not inside other /start/ .. /end/ block)

      take everything between /start/ and (/end/ which is not inside other /start/ .. /end/ block)

      That would be

      start b f j end

      but I get

      start b start c d e end f start g h i end j end

      from /start/ .. (!(/start/../end/) && /end/)

        It seems its harder to explain as I thought...

        This is exactly the output I wished: to get everything between outer 'start' and 'end'