re = /""".*?"""(*SKIP)(*FAIL)|(,)/m
str = 'c5604d659e4a4dee8f16d4449e3d94cd,1626656731,2021-07-18 19:05:31,,1289,5,0,3,2,0,1,1,,www.hp44clk.com,1,0,0.0,CPC,0.0,RPC,79545831,589aebf897e9c85c062871888fbdbb59,,,,,,0,,0,N/A,107.77.227.150,"""Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1""",en-us,,,,,,,iOS,14.6,Apple,,Mobile,en,Safari,,United States,Hawaii,Kailua,744,Att Mobility Llc,0,,Yes,No,No,0,AT&T Wireless USA,,,'
# Print the match result
str.scan(re) do |match|
puts match.to_s
end
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 Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html