package main
import (
"regexp"
"fmt"
)
func main() {
var re = regexp.MustCompile(`(?m)(GSTIN No:-): (.*?\d\s)`)
var str = `TAX INVOICE CA MANIN DER SINGH AND ASSOCIATES 253 B 1/12 APSARA ARCADE PUSA ROAD.NEW DELHl-110005 GSTIN No 07APAFD8365H1Z9 Bill to Place of Supply INVOICE No Dated RK Electrical Works RK Electrical Works A-240 Palam Vihar, Delhi GSTIN No:-07BBUPS5612K1Z9 Description of Services Professional Services for Month of July Total Less Discount Taxable Value ADDCGST9% ADDSGST9% Total Amount Chargeable (in words) Rupees One Lac Eighteen Thousand Only Company's PAN: AAKFD6723D Note-Please make cheques in favor of "CA Maninder Singh and Associates" A-240 Palam Vihar, Delhi MSA-Tl-02 1-Jul-17 SAC CODE Amount 9982 100000 100000 0 100000 9% 9000 9% 9000 118000.00 For CA Maninder Singh & Associates Authorised Signatory ()-`
var substitution = "$1,$2 in $3:"
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/