给定以下键值对,我如何才能仅匹配值(包括引号)?
解释:我正在 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"
我的尝试 https://regex101.com/r/sX8qU8/2(这不起作用,甚至没有接近):
[:]\s*(\"\w*\")
您可以使用该模式:
[:]\s(\".*\")
并通过以下链接进行测试:https://regex101.com/r/nE5eV3/1 https://regex101.com/r/nE5eV3/1
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)