package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?i)(?<=^|<br/>)(?:(?!<br/>).)*other than Incremental Company Loans[\s\S]*?(?=[.;]<br/>|$)`)
var str = `Maximum number of Utilisations<br/>A Borrower (or the Parent) may not deliver a Utilisation Request if as a result of the proposed Utilisation:<br/>[ 10 ] or more Term Loans [(other than Incremental Company Loans)] would be outstanding; [or]<br/>[ 15 ] or more Revolving Company Utilisations would be outstanding[; or<br/>[ 20 ] or more Incremental Company Loans would be outstanding].<br/>A Borrower (or the Parent) may not request that a Company A Loan [or an Incremental Company Loan] be divided if, as a result of the proposed division, [ 25 ] or more Company A Loans [or [ 50 ] or more Incremental Company Loans] would be outstanding.<br/>[A Borrower (or the Parent) may not request that a Company B Loan or a Company C Loan be divided.]`
for i, match := range re.FindAllString(str, -1) {
fmt.Println(match, "found at index", i)
}
}
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/