You will need to use GNU grep
:
grep -oPz 'mutablePath = CGPathCreateMutable\(\);.*?(\n.*?)*.*?CGPathAddPath\(skinMutablePath, NULL, mutablePath\);' file
If you don't have GNU grep
, you could use pcregrep
to achieve the same thing:
pcregrep -M 'mutablePath = CGPathCreateMutable\(\);.*(\n|.)*CGPathAddPath\(skinMutablePath, NULL, mutablePath\);' file