Hi,

SHANKAR R-R66203 wrote:
>
> In a function,
>    I am executing a search.
>    I have to implement different things based on whether search got a
> result or failed with an error.
> 
>   exec '/^\w\+\t\w\+'
> 
> In the next line, I have to check whether the test passed or failed.
> 
> How do I do this ?

use the search() function:

  if search('/^\w\+\t\w\+') != 0
    " do something
  endif

Regards,
Jürgen

-- 
Jürgen Krämer                              Softwareentwicklung
HABEL GmbH & Co. KG                        mailto:[EMAIL PROTECTED]
Hinteres Öschle 2                          Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-Weilheim                    Fax: +49 / 74 61 / 93 53 - 99

Reply via email to