I use the below command to grep and get the substring that lies between two strings.
echo "This is an example" | grep -o -P '(?<=This).*(?=example)'
which would give is an
Now I got a huge amount of raw string that has the below format
"],"id":"1785695Jkc","
I tried to use the above mentioned command for this String too. But it did not work.
grep -o -P '(?<="],"id":").*(?=",")'