I have a pattern that looks something like this .
var a ;
var b;
var obj = {
aa : 'This is what I want'
};
I want the text between aa : ' and '};
There might be multiple occurrences of this, but I would like to have the first one.
I have tried awk , grep and sed. But none of them gave me the perfect result, but spit out entire code.
What I have tried till now :
grep -Po "aa : \K.*(?= \'};)"
sed -e 's/aa :\(.*\)\n};/\1/'