#!/bin/bashs='A culprit \" escaped quote and "String1 \"here\"""String2"'grep -oP '(?<!\\)(?:\\{2})*\K"[^"\\]*(?:\\.[^"\\]*)*"' <<< "$s";
Standard input is empty
"String1 \"here\"" "String2"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!