regex extract match for every fourth comma in the string

I am trying to create a regex to get a output for below string, in sets of 4 comma separated values. I have tried something but it only selects each comma separated value. I don’t know how to get the desired output.

The regex I tried:

".*?"(?=,|$)

Data:

"T","Success","2","2","T","Success","6458960","1","F,"You do not have sufficient credit.","6458962","1"

Desired out:

"T","Success","2","2"  
"T","Success","6458960","1"  
"F,"You do not have sufficient credit.","6458962","1"


Source: regex

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.