Hi All,

I'm trying to get a matchstr function to return me the string of
printable character, excluding the white space.  So for example,
        :echo matchstr(":foo^[bar", ':\p*')
return "foo" since ^[ is the esc character.

And
        :echo matchstr(":foo bar", ':\S*')
returns "foo" as well.

I'm using the colon in this example for the first part in matching the
string, but how do I combine the two printable character and exclude
white space regexes into the same expression so that it can handle
both strings ":foo bar^[bar" and ":foo^]bar bar" and extract "foo"?

Thanks!





--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to