I have a line in the form
Foo "Foo" "Some Foo" "Some Foo and more"
I need to extract the Foo value which is in quotation marks and can be enclosed in any number of alphanumeric and white space characters. So, for the examples above, I would like the result to be
<NoMatch> Foo Foo Foo
I tried to get this to work, and this is the pattern I have so far used using lookahead / lookbehind for quotes. This works for "Foo" but not for others.
(?<=")Foo(?=")
Further expanding this to
(?<=")(?<=.*?)Foo(?=.*?)(?=")
does not work.
Any help would be appreciated!
source share