package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)^:Quote_two \([\s\S]+?[\r\n]+\)`)
var str = ` :Quote_one (
:parent (QUOTES_ALL)
:id ("abc1234")
:display_name ("Quote Number One")
:children (
: (Quotes)
: (Sayings)
)
)
:Quote_two (
:parent (QUOTES_ALL)
:uuid ("def456")
:display_name ("Quote Number Two")
:Address (
: (
:num ("1234")
:city ("Dallas")
:state ("TX")
)
)
:Numbers (
: (
:num1 ("345-222-1111")
:num2 (123)
:num3 (456)
)
)
:Names (
: ("Test")
: ("Test2")
: ("Test3")
)
)
:Quote_three (
:parent (QUOTES_ALL)
:id ("xyz1234")
:display_name ("Quote Number Three")
:children (
: (Quotes)
: (Sayings)
)
)`
var substitution = ""
fmt.Println(re.ReplaceAllString(str, substitution))
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Golang, please visit: https://golang.org/pkg/regexp/