vi editor doubt ? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

vi editor doubt ?

hi,

how can i search more than one values in a text file opened in vi editor.

i.e, to do a forward search we use /searchstring and to do a backward search we use ?searchstring, but, how can i check more than one search string in a file, as we are doing in grep family of commands.

thanks in advance

- sri


Comments

  • abcabc Posts: 443Member
    bearing in mind you need to escape parantheses and the logical 'or':

    /(string1)|(string2)
  • ssvasanssvasan Posts: 101Member
    Hi,

    This option not working, it always displays pattern not found error.
    I want to check more than one string is it possible, but it is possible in grep, but within vi editor can able to check more than one search string ?

    thanks

    - sri.



    : bearing in mind you need to escape parantheses and the logical 'or':
    :
    : /(string1)|(string2)
    :



Sign In or Register to comment.