I don't think that using regexp in this case is what I'd call "elegant way". Also, I'm not sure that this will be efficient solution. I'd rather write a parser for this quite simple format, that would turn this output into data structure. This is also more scalable approach, as if you eventually need more fields from the output, you can just use them without fiddling with regexp.
In reply to Re: Multiple line records from a command string
by zwon
in thread Multiple line records from a command string
by Preceptor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |