正则表达式包·免费
JSON 和 YAML 正则
用于 JSON 和 YAML 的 14 个模式:键、值、JSON 不接受的 NaN 或 undefined、YAML 缩进里的制表符,以及没加引号的 yes 或 no。有些还能直接修正,比如给 JavaScript 对象的键加上引号。
免费安装。
如果你的 Android 设备上装了 PocketCode,这会在应用里打开此页面。
预览
14 个中的 3 个
(?<![^\s\[\{,])"([^"\\\n]*+(?:\\.[^"\\\n]*+)*+)"\s*+:JSON key (name in $1)
:\s*+"([^"\\\n]*+(?:\\.[^"\\\n]*+)*+)"JSON string value (text in $1)
:\s*+(-?(?:0|[1-9]\d*+)(?:\.\d++)?(?:[eE][-+]?\d++)?)(?=\s*+[,\]\}])JSON number value (in $1)
1.0.0 的变更
首个版本。