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
Post a Comment