I have a file that
<a href="blah.com" rel="blahblah" style="textdecoration:none;">blah</a>
I want to match rel="blahblah"
but when i do \rel=".*"
it matches rel="blahblah" style="textdecoration:none;"
I have tried rel=".*\{-\}"
but that gives an error nested \{
You can use:
rel=".\{-}"
\{-}
is used for non-greedy match in VIM
Try [^"]
instead of .
. The latter is "greedy" and will match as many characters as possible.
The [d-r13579]
in regexps is used to match "character classes": in this case any small case letter in the range from d
to r
or an odd digit. If you start the class with a ^
then it negates the meaning.
Thus [^"]
means a character except a double quote, and "[^"]*"
means two double quotes with any number of arbitrary characters between them, except double quotes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With