This
("((?:[^"\\])*(?:\\\")*(?:\\\\)*)*")
will capture all strings (within double quotes), including \" and \\ escape sequences. (Note that this answer assumes that the only escape sequences in your string are \" or \\ sequences -- no other backslash characters or escape sequences will be captured.)
("(?: # begin with a quote and capture...
(?:[^"\\])* # any non-\, non-" characters
(?:\\\")* # any combined \" sequences
(?:\\\\)* # and any combined \\ sequences
)* # any number of times
") # then, close the string with a quote
Try it out here!
Also, note that maksymiuk's accepted answer contains an "edge case" ("Imagine trying to actually match a string which ends with a backslash") which is actually just a malformed string. Something like
"this\"
...is not a "string ending on a backslash", but an unclosed string ending on an escaped quotation mark. A string which truly ends on a backslash would look like
"this\\"
...and the above solution handles this case.
If you want to expand a bit, this...
(\\(?:b|t|n|f|r|\"|\\)|\\(?:(?:[0-2][0-9]{1,2}|3[0-6][0-9]|37[0-7]|[0-9]{1,2}))|\\(?:u(?:[0-9a-fA-F]{4})))
...captures all common escape sequences (including escaped quotes):
(\\ # get the preceding slash (for each section)
(?:b|t|n|f|r|\"|\\) # capture common sequences like \n and \t
|\\ # OR (get the preceding slash and)...
# capture variable-width octal escape sequences like \02, \13, or \377
(?:(?:[0-2][0-9]{1,2}|3[0-6][0-9]|37[0-7]|[0-9]{1,2}))
|\\ # OR (get the preceding slash and)...
(?:u(?:[0-9a-fA-F]{4})) # capture fixed-width Unicode sequences like \u0242 or \uFFAD
)
See this Gist for more information on the second point.