Edward Beach wrote:
> I'm trying to return a string filtered from output generated
> by an external application. The string in question is
> proceeded by "Label:\t" so here's my attempt:
>
> :echo matchstr(system("<command>"), '\nLabel:\s\+\(\S\+\)\n')
>
> but it returns the entire line; how can I isolate the unknown
> string in \( \) ?
Using \zs to start the search is easiest. Assuming the string is
restricted to one line, the following pattern should work:
^Label:\s\+\zs.*
John
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---