in reply to Re: Extract Multiple Lines from the End of a multi-line string
in thread Extract Multiple Lines from the End of a multi-line string
This matches the penultimate lines.'^' . ( '.*\\n' x ($N-1) ) .
I'm a little fuzzier on this bit. ?: is for a non-captured group I think, the .*\\n must be the last line especially when used with the \z but what is the +| for? and also the [0] on the end of the return?'(?:.+|.*\\n)'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Extract Multiple Lines from the End of a multi-line string
by ikegami (Patriarch) on Oct 17, 2008 at 00:08 UTC | |
|
Re^3: Extract Multiple Lines from the End of a multi-line string
by ikegami (Patriarch) on Oct 17, 2008 at 00:11 UTC | |
by NateTut (Deacon) on Oct 17, 2008 at 16:15 UTC | |
by ikegami (Patriarch) on Oct 17, 2008 at 16:58 UTC | |
by NateTut (Deacon) on Oct 17, 2008 at 17:03 UTC | |
by ikegami (Patriarch) on Oct 17, 2008 at 17:09 UTC | |
|