Moseley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 06, 2007 2:49 PM
To: vim@vim.org
Subject: Re: FW: Adding quotes around html attribute values
On Tue, Mar 06, 2007 at 11:04:11AM -0500, Timothy Adams wrote:
> Hi,
>
> I've been given some html which, oddly, is half in nicely quoted
&
On Tue, Mar 06, 2007 at 11:04:11AM -0500, Timothy Adams wrote:
> Hi,
>
> I've been given some html which, oddly, is half in nicely quoted
> attributes+values:
Have you considered using a tool that is designed to fix up your html?
Such as HTML Tidy?
--
Bill Moseley
[EMAIL PROTECTED]
and half not
I'm trying to write a regex to add quotes around the ones without. I can
do this in perl, but not in vim, and I'd like to know what I'm doing
wrong because I've run across this problem before.
This was my attempt:
:%s/=\([^"]\+\)\{-}\([ >]\)/="\1"\2/g
My reasoning:
=\