【发布时间】:2019-12-17 17:57:00
【问题描述】:
我想提取所有 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
非常感谢您的回复:-)
【问题讨论】:
-
您搜索了什么,找到了什么?您尝试过什么,它是如何失败的?
-
另外,您使用的是哪种编程语言?
-
另外,请阅读
regextag info page;它展示了如何用足够的细节提出正确的问题。 -
您的输入是字符串还是数组?我们需要了解语言。是否可以使用带引号的转义引号:
"my \"string\""? -
嗯,使用 JSON 解析器。
标签: regex comma brackets quote