I want to match a block of code multiple times in a file but can't work out the regular expression to do this. An example of the code block is:
//@debug
...
// code in here
...
//@end-debug (possibly more comments here on same line)
Each code block I'm trying to match will start with //@debug
and stop at the end of the line containing //@end-debug
I have this at the moment:
/(\/{2}\@debug)(.|\s)*(\/{2}\@end-debug).*/
But this matches one big block from the first //@debug
all the way to end of the line of the very last //@end-debug
in the file.
Any ideas?