The pattern below allows me to isolate a single term that is enclosed in double quotes. However i'd like to be able to isolate multiple terms that are double quoted and separate them if possible.
pattern MyPattern = pattern.compile('("(.*)")');
Matcher MyMatcher = MyPattern.matcher('asf "dfa, sfdsf sdfasdf asfdasdf sdf asf , asdfs , asf sf" sf as"emily, md " dfa ');
System.debug('THE STATEMENT MATCHES: ' + MyMatcher.find());
System.debug('THE MATCH FROM EXPRESSION: ' + MyMatcher.group());
The pattern above isolates the following string:
Isolated String: "dfa, sfdsf sdfasdf asfdasdf sdf asf , asdfs , asf sf" sf as"emily, md "
However ideally i'd like to have the following isolated strings:
Match 1: "dfa, sfdsf sdfasdf asfdasdf sdf asf , asdfs , asf sf"
Match 2: "emily, md "