Unix Flex Regex for Multi-Line Comments
If you're required to make do with just regex, however, there is indeed a not-too-complex solution:
"/*"( [^*] | (\*+[^*/]) )*\*+\/
The full explanation and derivation of that regex is excellently elaborated upon here.
In short:
You don't match C style comments with a simple regular expression in Flex; they require a more complex matching method based on start states. The Flex FAQ says how (well, they do for the /*...*/
form; handling the other form in just the <INITIAL>
state should be simple).