I did search stackoverflow
I have successfully arrived at a simplified regex, as I said earlier, for a C-style grammar without the backslash literals of C, but I wanted to hear your alternative suggestions, to see if they are more elegant than my effort.
One of the recent successful attempts is as follows:
\/\*\X*?\*\/I seem to remember I did an alternative regex using lookahead, but I can’t find it just now.
There’s also the question of which regex engine you use, as engines differ in their capabilities. I use
https://regex101.com/ for testing and have tried out the various choices for emulated engines that the website’s own sophisticated engine offers. I am using the regex within Apple’s iOS Shortcuts’ regex ‘match’ and ‘replace’ functions.