in reply to Re: Parsing multiline string line by line
in thread Parsing multiline string line by line

i was sure there would be some way of doing it with regex, but i don't quite understand what's happening here: first iteration it will match a string of non-newline chars (first line), but how does it know to continue on the "second (etc.) line" on the rest of the iterations of the while loop?

thanks for reply!!
  • Comment on Re^2: Parsing multiline string line by line

Replies are listed 'Best First'.
Re^3: Parsing multiline string line by line
by mikelieman (Friar) on Feb 19, 2009 at 14:42 UTC
    Perhaps it's a truism that for any computational process, there is a regex of arbitrary complexity which will solve it.
Re^3: Parsing multiline string line by line
by perreal (Monk) on Feb 19, 2009 at 15:16 UTC
    check this, it is explained in the global matching section.