replace all except some part

My problem is simple:

I want to filter a text except some part of it. I can match easily the part I don’t want to be filtered. For example

I searched a better way to do that, but the best I can do is using split and scan.

An usage is:

A better syntax would be:

I would expect the split make a search on a regular expression and then give the matched expression into the $& variable. But it is not the case.

If someone know a nicer way to do that I will be happy to know how.


comments powered by Disqus
Published on 2009-09-22
Follow @yogsototh
Yann Esposito©
Done with Vim spacemacs & nanoc Hakyll

ADA: DdzFFzCqrhtAvdkmATx5Fm8NPJViDy85ZBw13p4XcNzVzvQg8e3vWLXq23JQWFxPEXK6Kvhaxxe7oJt4VMYHxpA2vtCFiP8fziohN6Yp