go - Regex to match everything between -


i've been trying @ hour, i'm no regexpert. want seems simple, it's turning out lot more difficult have thought.

basically have this:

<<< code      def prnt(string)         print(string)     end  =====      def println(string)         puts(string)     end  ***** <<< more code ... 

what want capture between first line <<< code , *****. there lots of blocks in file.

the regex have far (?:<<< .*\r?\n)([\s\s]+)(?:[*]{5}), doesn't work. ideas? language i'm using in go.

never mind figured out!

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

it seems big thing making match group in middle lazy match little possible.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -