http://qs321.pair.com?node_id=749671


in reply to Re^2: Regexing a block of text in between patterns
in thread Regexing a block of text in between patterns

Hello CountZero

Otherwise you will leave some junk at the beginning of each block

I purposely included the [Sidenote] text after understanding the OP's specification this way.

Maybe I didn't read closely enough ...

Thanks & Regards

mwa

  • Comment on Re^3: Regexing a block of text in between patterns

Replies are listed 'Best First'.
Re^4: Regexing a block of text in between patterns
by CountZero (Bishop) on Mar 10, 2009 at 19:42 UTC
    Now that you say it I looked again at his regex and indeed one could think that "[Sidenote:" is the breakpoint, which does not fully tally with his question.

    Well, he now has both options to choose from!

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James