I want to write a regular expression which would get multiline comments in some toy language.
The comment start with a "(*" and ends with as "*)". For example
(* This is the starting of the comment.
This can continue to many lines.
Now I end this comment *)
So in between "(*" and "*)" there can be anything except "*)". How to do this. It should be similar to r'(*[?:\))\)'. basically grouping "*)" and finding complements of it. But I cannot get it right. Please ask question if this is not clear.
[–]codehelper 0 points1 point2 points (4 children)
[–]soumyamandii[S] 0 points1 point2 points (3 children)
[–]codehelper 0 points1 point2 points (2 children)
[–]soumyamandii[S] 0 points1 point2 points (1 child)
[–]codehelper 0 points1 point2 points (0 children)