Hi,

[EMAIL PROTECTED] wrote:
> 
>  Suppose there is a file containing a path/filename -- in each line:
> 
>  #----
>  a.txt
>  b.txt
>  c.txt
>  #----
>  1.txt
>  2.txt
>  3.txt
>  4.txt
>  #----
>  1.txt
>  3.txt
>  4.txt
>  #----
> 
>  Now I want to replace any combination of
>  1.txt
>  2,txt
>  by - say - 
>  x.txt
> 
>  Is there a way to expand / of two/more lines ?

you can represent an end-of-line inside a regular expression with \n

  :%s/^1\.txt\n2\.txt$/x.txt/

Regards,
Jürgen

-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

Reply via email to