code: func ScanPairGreedy(data []byte, open, close byte) (n int) {
  	var m int
  	opened := 1
  	for {
  		i := bytes.IndexByte(data[n:], close)
  		if i == -1 {
  			return -1
  		}
  		n += i
  		// If found index is not escaped then it is the end.
  		if n == 0 || data[n-1] != '\\' {
  			opened--
  		}
  
  		for m < i {
  			j := bytes.IndexByte(data[m:i], open)
  			if j == -1 {
  				break
  			}
  			m += j + 1
  			opened++
  		}
  
  		if opened == 0 {
  			break
  		}
  
  		n++
  		m = n
  	}
  	return
  }
docs: // ScanPairGreedy scans for complete pair of opening and closing chars in greedy manner.
  // Note that first opening byte must not be present in data.