Who would think it was possible...

On 7/12/06, Erez D <[EMAIL PROTECTED]> wrote:
if anyone is interested, here is the solution:

:%s/\([0-9]*\)+\([0-9]*\)/\=submatch(1)+submatch(2)/g

cheers
erez.


On 7/11/06, Erez D < [EMAIL PROTECTED]> wrote:
>
> i have a text that looks like:
>
> 8+9 to 20
> 1+7 to 29
>
>
> and i want to change it to:
>
> 17 to 20
> 8 to 29
>
> (i.e. do the math)
>
>
> how do i do that in vi ?
>
> thanks,
>
> erez.
>




--
Andre Bar'yudin
http://www.baryudin.com/

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to