Instead of .*
use .\{-}
.
%s/style=".\{-}"//g
Also, see :help non-greedy
More Related Contents:
- What do ‘lazy’ and ‘greedy’ mean in the context of regular expressions?
- Greedy vs. Reluctant vs. Possessive Qualifiers
- What is the difference between .*? and .* regular expressions?
- Non greedy (reluctant) regex matching in sed?
- How can I write a regex which matches non greedy? [duplicate]
- Regex credit card number tests
- Remove everything except regex match in Vim
- How does one escape backslashes and forward slashes in VIM find/search?
- Question marks in regular expressions
- How to search and replace with a counter-based expression in Vim?
- How to get Vim to highlight non-ascii characters?
- Why does VIM have its own regex syntax?
- Can I substitute multiple items in a single regular expression in VIM or Perl?
- Match parenthesised block using regular expressions in vim
- How to do a non-greedy match in grep?
- Shortest match in regex from end
- Why is this regex allowing a caret?
- Regex: ignore case sensitivity
- What is the ultimate postal code and zip regex?
- Negating a backreference in Regular Expressions
- Regex to split HTML tags
- Regular expression – starting and ending with a character string
- To use or not to use regular expressions?
- Multiple regex matches in Google Sheets formula
- Regex: How to match a string that is not only numbers
- How do I get regex support in Excel via a function, or custom function?
- Combining $regex and $or operators in Mongo
- Case insensitive search in Mongo
- How to measure similarity between strings?
- “UnicodeEncodeError: ‘ascii’ codec can’t encode character”