正则表达式以匹配所有之间

I've been trying at this for an hour, but I'm no regexpert. What I want to do seems fairly simple, but it's turning out a lot more difficult than I would have thought.

Basically I have this:

<<< Some code

    def prnt(string)
        print(string)
    end

=====

    def println(string)
        puts(string)
    end

*****
<<< Some more code
...

What I want to do is capture everything between the first line <<< Some code and the *****. There will be lots of blocks like this in a file.

The regex that I have so far is this (?:<<< .*? )([\s\S]+)(?:[*]{5}), but it doesn't really work. Any ideas? The language I'm using it in is Go.

Never mind I figured it out!

(?:<<< .*? )([\s\S]*?)(?:[*]{5})

It seems like the big thing was making the match group in the middle lazy so that it would match as little as possible.

This captures the target in group 1, but you must use the "dot matches newline" switch "s":

<<<[^
]+[
]*(.*?)[*]{5}

See live demo.