$re = '/(GSTIN No:-): (.*?\d\s)/m';
$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 ()-';
$subst = "$1,$2 in $3:";
$result = preg_replace($re, $subst, $str);
echo "The result of the substitution is ".$result;
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 PHP, please visit: http://php.net/manual/en/ref.pcre.php