我拥有的字符串示例:
{"prices":"","sTld":"com","sSld":"test1","available":false,"type":"","options":""}
{"prices":"","sTld":"co.uk","sSld":"test2","available":false,"type":"","options":""}
{"prices":"","sTld":"in","sSld":"test3","available":false,"type":"","options":""}
{"prices":"","sTld":"lt","sSld":"test4","available":false,"type":"","options":""}
我想提取这些值:
com, co.uk, in, lt
test1, test2, test3, test4
换句话说,我想从 sTld 中提取从“:”到“”的每个值,以及从“:”到“”的 sSld 中的值。
我想我需要为此使用正则表达式,但我不知道如何。有什么建议么?