var abcConfig={ "assetsPublicPath":"https://abcd.cloudfront.net/" } var abcConfig1={ "assetsPublicPath1":"https://abcd.cloudfront.net/1" } I am looking for a regex which generates key value pair [ abcConfig: {"assetsPublicPath": "https://abcd.cloudfront.net/"}, abcConfig1: {"assetsPublicPath1": "https://abcd.cloudfront.net/1"} ] Continue reading...