I am looking for regular expression for matching text commented in C style block comments (/* ... */) but only those blocks containing character ";" in it. For example following text
/*
some non code comment
*/
/*
some_code();
*/
/*
another non code comment
*/
important_code();
/*
yet another non code comment
*/
should match pattern around "some_code();", but not around the outter ones. The closest to solution I got is
/\*(.|\r?\n)*?;(.|\r?\n)*?\*/
but it unfortunately selects the first block as well. I was thinking that perhaps some way to disallow occurence of "/*" in the pattern would do the trick, but I have no idea how that can be done.
Any help would be appreciated. Solutions i found here or on the web are usually working with one line comments (//) containing ";" character or any block comments (not necessarily with ";" in it), nothing like I am describing here. Ideally it would be usable in Visual Studio 2013.
EDIT: Updated the example to cope with some corner cases.