[lug] vi wildcards
Alan Robertson
alanr at unix.sh
Thu May 24 06:40:30 MDT 2001
John Starkey wrote:
>
> I'm trying to delete about 500 SPAN tags in a document I have to code
> using vi. All of them include a css class. Can someone tell me how to use
> wildcards in a :s statement?
>
> I've tried:
>
> :1,$s/<SPAN CLASS=\"*\">//g
> :1,$a/<SPAN CLASS=\"\*\">//g\\
:g/SPAN/s/<SPAN CLASS=[^>]*>//g
This will delete only up to the *first* > on the line, so if there are
other tags on the line, they won't all get eaten up...
-- Alan [who cut his teeth on 'ed' ] Robertson
alanr at unix.sh
More information about the LUG
mailing list