给定以下键值对,我如何才能只匹配值(包括引号)?
说明:我正在我的 IDE 中进行查找和替换。我有数百个键/值对,其中的值需要从字符串更改为对象。所以基本上替换了值。
"ElevationFilenameIn": "Input raster elevation file",
"TargetCRS": "Target vertical coordinate reference system Type",
"featureName": "The name of the feature to extract, for example \"Vegetation\" or \"Water\"",
"TargetCRScode": "Target vertical coordinate system Code",
"TargetCRSfile": "The projection (.prj) file in shoebox to be used for this inputfile"
My attempt (这是行不通的,甚至没有关闭):
[:]\s*(\"\w*\")
最佳答案
关于Javascript 正则表达式匹配 JSON 键值对的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37007112/