I am trying to find a word, but only when it occurs between quotation marks. For example, I want to find the word "were", but only when it occurs in dialogue (the punctuation has been smartened, by the way). As in:
Code:
Thats where were going!
Normally I'd try to use a combination of lookaheads and lookbehinds to find it, as in:
Code:
(?<=.*?)\bwere\b(?=.*?)
But because lookaheads/lookbehinds need a defined character length (I think), the above won't actually work...
Is there a way to match *and* isolate the "were"? Or is matching the whole dialogue string the best one can hope for (eg: .*?\bwere\b.*?)?