用于在方括号、逗号和引号 [] , " 之间提取文本的正则表达式

Regular expression to extract text between square brackets, comma and quote [] , "

我想提取所有 4 个字段。请帮助我

这是数据库结构:

[12.345,-12.34567,"title 34","12345"],[-12.987,12.765,"title 36","7689"]

12.345 = latitude data with number and point and dash
-12.34567 = longitude data with number and point and dash
title 34 = text with space and number
12345 = number id with number

我想得到这个结果

1 = 12.345
2 = -12.34567
3 = title 34
4 = 12345

我测试了很多解决方案但没有成功 这个例子帮助我迈出了第一步,但并不完全 Regular expression to extract text between square brackets

非常感谢您的回复:-)

试试这个:\[(?'lat'[-.0-9]+),(?'long'[-.0-9]+),\"(?'text'[^\"]+)\",\"(?'id'\d+)\"\] 结果按名称分组。

下面是 link 示例:https://regex101.com/r/YNv8qr/1