On Tue, 13 Jul 2004, Daniel Crookston wrote:
> Cool. So how do I do a non-greedy wildcard inside them? :%s/<.*>//g
> doesn't just strip out tags, it strips tags and everything inside of them
> too.
[...]
Actually, a (normal) greedy match would turn "<b><i>foo</i></b>" into "".
Single-line-matching is the only reason why it doesn't snip everything from
the first < to the last > in your whole file. Non-greedy matches aren't
trivially implementable for the general case in a greedy regex, which is why
they have to be added to the language (that is, they're not just syntactic
sugar). But in your case, %s/<[^>]*>//g should do the trick.
-J
____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list