I have the following string:
example_string <- "In this document, Defined Terms are quotation marks, followed by definition. \"Third Party Software\" is software owned by third parties. \"USA\" the United States of America. \"Breach of Contract\" is in accordance with the Services Description."
I want to extract every substring which is at least partially capitalised and is sandwiched by quotation marks. So the output should be:
"Third Party Software" "USA" "Breach of Contract"
I got as far as this with the regex:
str_extract_all(example_string, "(?:\")\\w(\\s*\\w+)*")
[[1]]
[1] "\"Third Party Software" "\"USA" "\"Breach of Contract"
I can't figure out a way to avoid matching the opening escaped quotation mark \". I know I can just add a gsub line to clean it out after extracting the defined terms, but I think there must be a way to do it all in one regex call.
Any suggestions greatly appreciated!