Zend certified PHP/Magento developer

Grep match on finding regular expression matches other than known strings

I have a bunch of .sql files and in quite a few of them we use package I wrote called ‘carlmann_demo’. Whatever file uses such package will do as follows:

-- This line will be present in every file that uses carlmann_demo
exec carlmann_demo.testProlog;

-- Uses of carlmann_demo other than testProlog, testEpilog like the ones below are optional
carlmann_demo.releaseReport;
carlmann_demo.canBeAnything;

-- This line will be present in every file that uses carlmann_demo
exec carlmann_demo.testEpilog;

What I want to do is come up with a way of listing the files that are having optional uses of ‘carlmann_demo’ (i.e. files that have words matching carlmann_demo.* other than “carlmann_demo.testProlog” , “carlmann_demo.testEpilog”).

I have tried as follows but it has not worked since it list all files that use carlmann_demo:

grep -sRl "carlmann_demo" | grep -v "carlmann_demo.testEpilog" | grep -v "carlmann_demo.testProlog"

I am pretty sure this can be done on the terminal via grep but so far I have not succeeded.

Any help would be appreciated!