It is not easy for me to try to match strings with one or two quotation marks with Vim's regex engine.
The problem is that I assign the regular expression to a variable and then use this to play with matchlist.
For example, suppose I know that I am in a string containing a quoted string and want to match it:
let regex = '\v"(.*)"'
This will work to match everything that was double. Similarly, this will match with single quotes:
let regex = "\v'(.*)'"
But if I try to use both of them, for example:
let regex = '\v['|"](.*)['|"]'
or
let regex = '\v[\'|\"](.*)[\'|\"]'
Then Vim does not know how to deal with this, because he believes that some quotation marks do not close in the definition of the actual variable, and this will ruin the regular expression.
?
(!) - , .
, , .