[ILUG] Regex Question
Thomas Adam
thomas at edulinux.homeunix.org
Mon Sep 27 16:29:04 IST 2004
On Mon, Sep 27, 2004 at 05:19:18PM +0200, Michael Conry wrote:
> Hi,
>
> I'm no regex guru, but this seems to work. You might need to fine
> tune a bit (and the first but assumes you have pre-selected the text
> to be re-worked using the vim visual selection
>
> :'<,'>s/\(\%(<div[^>]\+><[^>]\+>\_s\)\{2\}<div[^>]\+>\)\([^<]*\)\(<\/div>\)/\1
> TEST \3/
You can also do this with the use of 'macros'.
-- Thomas Adam
--
$ source ~/.bash_history
More information about the ILUG
mailing list